Skip to content
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

fix the pyplot version of rc_context #1866

Merged
merged 1 commit into from Mar 28, 2013
Merged

Conversation

ivanov
Copy link
Member

@ivanov ivanov commented Mar 28, 2013

Before this, when using the rc_context dangling from pyplot, one would
get an AttributeError for __exit__, because plt.rc_context wasn't
actually returning anything before this change.

Before this, when using the rc_context dangling from pyplot, one would
get an AttributeError for ``__exit__``, because plt.rc_context wasn't
actually returning anything before this change.
@ivanov
Copy link
Member Author

ivanov commented Mar 28, 2013

even though this is a bugfix, it doesn't apply to v1.2.x, because pyplot didn't expose rc_context, it was only available from matplotlib proper.

@ivanov
Copy link
Member Author

ivanov commented Mar 28, 2013

Travis error on Py2.6 because it couldn't satisfy the PIL requirement, so I think that's a dud. 2.7 and 3.2 are green

@pelson
Copy link
Member

pelson commented Mar 28, 2013

The fix is good. 👍 on that front.
I wonder if we need rc_context in pyplot though? It's fairly easy to get at with matplotlib.rc_context...

@ivanov
Copy link
Member Author

ivanov commented Mar 28, 2013

plt.rc() and plt.rcdefaults() have been there since at least 2007 (git blame tells me that @efiring was the last to edit those lines then). So previously we could permanently change the rc params from plt, but not temporarily, and since now we have the handy contextmanager to do just that, it makes sense to expose it in the same place.

pelson added a commit that referenced this pull request Mar 28, 2013
fix the pyplot version of rc_context
@pelson pelson merged commit cf6b26f into matplotlib:master Mar 28, 2013
@pelson
Copy link
Member

pelson commented Mar 28, 2013

So previously we could permanently change the rc params from plt, but not temporarily, and since now we have the handy contextmanager to do just that, it makes sense to expose it in the same place.

I can't argue with that. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants