You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since v1.6.8, the default behavior of theta_labels in WindroseAxes.from_ax() is not user-friendly.
The results of running Tutorial's code ( that is, using the WindroseAxes.from_ax()) in #147 and #151, show that the label of theta is the default of matplotlib, not the default of windrose.
In #140, the implementation of theta_labels has been changed as follows.
“Pop and or"(Before):
self.theta_labels=kwargs.pop(“theta_labels”) or ["E", "N-E", "N", "N-W", "W", "S-W", "S", "S-E"])
kwargs in __init__ method has theta_labels key and its value is None.
kwargs in __init__ method has theta_labels key and its value is user's custom labels.
kwargs in __init__ method doesn't have theta_labels key itself.
"Pop and or" returns:
["E", "N-E", "N", "N-W", "W", "S-W", "S", "S-E"]
user's custom labels
KeyError is raised.
"Pop only" returns:
None
user's custom labels
["E", "N-E", "N", "N-W", "W", "S-W", "S", "S-E"]
Maybe #140 was trying to fix the KeyError in case 3. But unfortunately, the behavior of the case 1 has also changed.
If we call WindroseAxes.from_ax() with the default values, the function will call the WindroseAxes's constructor in the 1 case (See L88 and L102). Since None is passed to matplotlib, the theta labels will be the default values of matplotlib.
I believe the following is the user-friendly behavior:
["E", "N-E", "N", "N-W", "W", "S-W", "S", "S-E"].
user's custom labels. (this is, kwargs["theta_labels"])
["E", "N-E", "N", "N-W", "W", "S-W", "S", "S-E”].
The text was updated successfully, but these errors were encountered:
15b3
changed the title
Default behavior of theta_labels in WindroseAxis.from_ax() is not user-friendly.
Default behavior of theta_labels in WindroseAxes.from_ax() is not user-friendly.
Oct 26, 2021
Since v1.6.8, the default behavior of theta_labels in WindroseAxes.from_ax() is not user-friendly.
The results of running Tutorial's code ( that is, using the
WindroseAxes.from_ax()
) in #147 and #151, show that the label of theta is the default of matplotlib, not the default of windrose.In #140, the implementation of theta_labels has been changed as follows.
“Pop and or"(Before):
“Pop only"(After):
Let us consider the following three cases.
theta_labels
key and its value isNone
.theta_labels
key and its value is user's custom labels.theta_labels
key itself."Pop and or" returns:
["E", "N-E", "N", "N-W", "W", "S-W", "S", "S-E"]
"Pop only" returns:
None
["E", "N-E", "N", "N-W", "W", "S-W", "S", "S-E"]
Maybe #140 was trying to fix the KeyError in case 3. But unfortunately, the behavior of the case 1 has also changed.
If we call WindroseAxes.from_ax() with the default values, the function will call the WindroseAxes's constructor in the 1 case (See L88 and L102). Since
None
is passed to matplotlib, the theta labels will be the default values of matplotlib.I believe the following is the user-friendly behavior:
["E", "N-E", "N", "N-W", "W", "S-W", "S", "S-E"]
.kwargs["theta_labels"]
)["E", "N-E", "N", "N-W", "W", "S-W", "S", "S-E”]
.The text was updated successfully, but these errors were encountered: