-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Changed line color of boxplot for dark_background #15725
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
Conversation
I think the style should only set those properties that are necessary to change for the dark background. E.g. the linewidth does not care if it's a bright or dark background. This would allow to combine different styles. |
I have copied the whole thing from classic.mplstyle and just edited colors. |
Do you mean to say linestyle? |
That's precisely the point. The dark_background style should not contain linewidth, nor any other parameter that is not necessary for dark backgrounds. |
…lot.flierprops.color: w boxplot.flierprops.markeredgecolor: w boxplot.meanprops.color: g boxplot.medianprops.color: g boxplot.meanprops.markerfacecolor: g boxplot.meanprops.markeredgecolor: w boxplot.whiskerprops.color: w
Any reason to make the mean and median green instead of the original color from the colorcyle? |
I just thought that it would look highlighted. No specific reason. |
boxplot.capprops.color: white | ||
boxplot.flierprops.color: white | ||
boxplot.flierprops.markeredgecolor: white | ||
boxplot.meanprops.markeredgecolor: white |
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.
boxplot.meanprops.markerfacecolor
and boxplot.meanprops.markeredgecolor
are both C2
Therefore, I think we do not need to redefine boxplot.meanprops.markeredgecolor
.
boxplot.flierprops.markeredgecolor: white | ||
boxplot.meanprops.markeredgecolor: white |
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.
boxplot.flierprops.markeredgecolor: white | |
boxplot.meanprops.markeredgecolor: white |
Per @timhoffm 's suggestion. I think it is better to track the color cycle for these so they stay highlighted from the other lines.
I took the liberty of pushing a commit for not setting |
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.
Should be squashed before/when merging.
Going to ignore doc failures, since they're fixed on master. |
PR Summary
Rework of #15705. Closes #15675.
Previously, the black outlines of boxes in boxplots were hidden inside the black background in the
dark_background
style.Now: Outputs of boxplot_demo.py (https://matplotlib.org/examples/pylab_examples/boxplot_demo.html) using dark_background are as shown below:







PR Checklist