Skip to content

XKCD context manager not resetting anymore in 2.1 #9520

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

Closed
maxnoe opened this issue Oct 22, 2017 · 6 comments · Fixed by #9603
Closed

XKCD context manager not resetting anymore in 2.1 #9520

maxnoe opened this issue Oct 22, 2017 · 6 comments · Fixed by #9603

Comments

@maxnoe
Copy link
Contributor

maxnoe commented Oct 22, 2017

Bug report

Bug summary

The xkcd context manager does not reset the config anymore

Code for reproduction

import matplotlib.pyplot as plt

with plt.xkcd():
    plt.figure()
    plt.plot([1, 2, 3])
    plt.savefig('xkcd.png', dpi=300)


plt.figure()
plt.plot([1, 2, 3])
plt.savefig('not_xkcd.png', dpi=300)

Actual outcome

Both figures are in xkcd style

Expected outcome
Second figure should be using default style

Matplotlib version

  • Operating system:
  • Matplotlib version: 2.1
  • Matplotlib backend (print(matplotlib.get_backend())): Qt5Agg
  • Python version: 3.6

using anaconda

@jklymak
Copy link
Member

jklymak commented Oct 22, 2017

Is that example still documented that way? I think the way you do it now is at http://matplotlib.org/tutorials/introductory/customizing.html#temporary-styling

@maxnoe
Copy link
Contributor Author

maxnoe commented Oct 22, 2017

@jklymak
Copy link
Member

jklymak commented Oct 22, 2017

Yes fair enough. And it’s not implemented as a style.

@Kojoley
Copy link
Member

Kojoley commented Oct 22, 2017

2.0.2 is not affected, 2.1.0rc1 contains the bug.

@jklymak
Copy link
Member

jklymak commented Oct 22, 2017

Did this do it?

74680f6

@anntzer

@jklymak
Copy link
Member

jklymak commented Oct 22, 2017

I think I have a fix... See #9521

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 a pull request may close this issue.

3 participants