-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
look for colormap in rcParams['axes.prop_cycle'] (mpl 1.5+) first #11865
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
Thanks! Could you add a test and a release note? The test should ensure that the colors of the bar patches are correct. |
Added a new test with both a passed colormap and one set through mpl's rcParams. What do I need to do to add a release note? |
For the release note add a line in |
def test_rcParams(self): | ||
color_tuples = [(0.9, 0, 0, 1), (0, 0.9, 0, 1), (0, 0, 0.9, 1)] | ||
try: | ||
mpl.rcParams["axes.prop_cycle"] = mpl.cycler("color", color_tuples) |
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.
We'll need to be careful not to modify rcParams for the rest of the tests. Can't look right now, but I think we or matplotlib have a contextmanager that handles this. @sinhrks do you remember? Also you can move this to tpandas/tools/tests/test_graphics.py
and add it to one of the test classes in there.
I think it's good to go, though looks like I forgot to pull in the most recent changes to the release notes before adding my change... oops. Let me know if there's anything else that needs doing. |
@rcarneva Can squash the commits? (http://pandas-docs.github.io/pandas-docs-travis/contributing.html#combining-commits) For the rest this looks good I think! |
83cf990
to
26921b0
Compare
Thanks for the help with this, @TomAugspurger and @jorisvandenbossche |
I'm going to merge this now. I think it has the same problem that all of our compatibility code for mpl 1.5 has: what if the user has a prop_cycle where color isn't in the cycler? May need to look into that if it's something matplotlib tries to support. Thanks @rcarneva! |
look for colormap in rcParams['axes.prop_cycle'] (mpl 1.5+) first
Fixes #11614