-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Default boxplot style rebase #6481
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
Default boxplot style rebase #6481
Conversation
@phobson I hope you are ok with me making a few changes on top of your PR so we can get it merged before we cut the 2.x beta. I have tried to do a few modifications as possible to restore old default behaviours with matplotlib 1.5.x classic style and fix the tests. Let me know if you can spot any issues. |
@jenshnielsen absolutely! sorry i was lagging behind |
@@ -941,33 +941,37 @@ def validate_animation_writer_path(p): | |||
'boxplot.showfliers': [True, validate_bool], | |||
'boxplot.meanline': [False, validate_bool], | |||
|
|||
'boxplot.flierprops.color': ['C0', validate_color], |
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.
All of these changes need to be reflected into the template.
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.
As far as I can see they already do
Something is not right here, the output from http://matplotlib.org/examples/pylab_examples/boxplot_demo.html does not seem to respect the color (either on this branch or v1.5.1) but does work on master http://matplotlib.org/devdocs/examples/pylab_examples/boxplot_demo.html |
@tacaswell that is weird. I'm not sure what's going on. @jenshnielsen I'm not sure why the medians aren't showing up in this example either: https://github.com/matplotlib/matplotlib/pull/6481/files#diff-b5878226d9a3230ab74d34de5a0f994f |
Going for the Spinal Tap approach. Q: How much blacker could the boxplots be? A: A little, actually. I left some color in the median line.
It was just "blue". Now it's [0] to pick out the first color from the existing color cycle, whatever that may be.
dda22ef
to
6b895ed
Compare
@tacaswell I fixed the color issue (The flier color was set by the marker argument but not the face and edgecolor which was set to default values) |
The effect of the color can also be seen in the changes to boxplot_mod_artists_after_plotting.png
This is no longer the case because edge and facecolor now takes effect |
Running out of time to look more at this at the moment. I will try to get back to it later today. This will need some test image updated after the fix above. There seems to be something wrong with test_bxp_custompatchartist |
@phobson Sorry for being stupid but can you point me exactly to which example is missing the median? |
@jenshnielsen happily. It's right here: https://github.com/matplotlib/matplotlib/pull/6481/files#diff-b5878226d9a3230ab74d34de5a0f994f oddly, the custom patch artist example is fine. |
So we are talkign about bxp_patchartist.png? We should probably either change the default median color or change the default patch color to use some thing else than |
Oh yeah. That makes sense. This is tricky. My preference is that if we're filling in the box with a patch artist, the the median should be the same color as the border of the patch artist. Sorry if this was unintelligible. I'm on my phone. On Mon, May 30, 2016 at 7:48 AM -0700, "Jens Hedegaard Nielsen" [email protected] wrote: So we are talkign about bxp_patchartist.png? In that test we are plotting a median which has the color C0 on top of a patch with a color C0 so naturally it's not really visible. We should probably either change the default median color or change the default patch color to use some thing else than patch.facecolor — |
This has to be done via internal classic mode because it's using a rc param inherited from patch
Setting color alone has no effect as facecolor and edgecolor are still set to the default values
e43ace1
to
bb0b94b
Compare
Thats not really easy to do unfortunately. To do that I think we would need to add a different rc param for the median color when using patch. I changed the defaults mean and median to C1 and C2 which are different from the patch color. I squashed the image changing commits together |
backported to v2.x as ff98856 |
thanks @tacaswell and @jenshnielsen !! |
Rebase of #5523 on master hopefully fixing the travis issues.