-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Boxplot zorder kwarg #7178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boxplot zorder kwarg #7178
Conversation
@@ -3555,7 +3561,6 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True, | |||
# empty list of xticklabels | |||
datalabels = [] | |||
|
|||
zorder = mlines.Line2D.zorder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a weak preference for this continuing to track mlines.Line2D.zorder
by default, but could very easily be talked into change it.
It is low-risk and an oversight in the API so I think it is reasonable to backport to 2.x. Open to anyone talking me out of this position. |
@@ -3095,7 +3095,7 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, | |||
showbox=None, showfliers=None, boxprops=None, | |||
labels=None, flierprops=None, medianprops=None, | |||
meanprops=None, capprops=None, whiskerprops=None, | |||
manage_xticks=True, autorange=False): | |||
manage_xticks=True, autorange=False, zorder=2): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to have zorder=None
here so anyone who want to use default value can pass None
explicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. I debated doing it this way, but streamplot
had a default zorder of 2 IIRC, so I went with that convention.
I'll make the change in a bit.
If streamplot() still has a hardcoded property kwarg, then that is a bug On Mon, Sep 26, 2016 at 2:02 PM, Ben Congdon [email protected]
|
9fe3a36
to
0723cd5
Compare
@WeatherGod bug seems a bit strong, just one more piece of technical debt 😉 |
It looks like |
On 2016/09/26 1:55 PM, Ben Congdon wrote:
A separate PR would be good. |
return artists | ||
|
||
def bxp(self, bxpstats, positions=None, widths=None, vert=True, | ||
patch_artist=False, shownotches=False, showmeans=False, | ||
showcaps=True, showbox=True, showfliers=True, | ||
boxprops=None, whiskerprops=None, flierprops=None, | ||
medianprops=None, capprops=None, meanprops=None, | ||
meanline=False, manage_xticks=True): | ||
meanline=False, manage_xticks=True, zorder=2): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change this to None
too?
@@ -3382,6 +3385,10 @@ def _update_dict(dictionary, rc_name, properties): | |||
if ci[1] is not None: | |||
stats['cihi'] = ci[1] | |||
|
|||
# Use default zorder if none specified | |||
if zorder is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be moved to bxp
and just let the None
pass through this function.
0723cd5
to
8c90b1c
Compare
I made the requested change. Any insight as to why the tests are failing? |
the travis test was flaky, that test is known-fail on windows that we have not dealt with yet. |
Thanks @bcongdon ! |
Boxplot zorder kwarg
Backported to v2.x via e801685. |
boxplot
now accepts thezorder
kwarg to set the zorder of the drawn boxplot in the plotting function.Addresses #7171