r/Python • • Jan 10 '17

IPython shell with %matplotlib: the qt windows displaying figures disappear when I step away from the terminal application. Can this be fixed/is this typical behavior?

On my setup, figure windows created with the %matplotlib magic from an IPython shell (not entirely sure how this works) disappear after switching from my terminal application to any other running application, then back again. So, for example, if I am drawing a figure and want to check an /r/python thread in Chrome, after returning to my terminal application, I must re-declare the command plt.show().

Does this behavior sound atypical (something potentially wrong with my setup), or if it is typical, is there some possible workaround? Could this be unique to my installation/OS?

I am on MacOS Sierra, running the latest (just updated) versions of Anaconda and IPython. This problem is present using both iTerm2 and Terminal; does not seem to be related to the terminal application.

I tried asking in stackoverflow but they down voted my question without input, as is tradition.

7 Upvotes

9 comments sorted by

View all comments

Show parent comment

1

u/flutefreak7 Jan 12 '17

If you're getting frustrated and want to get to the bottom of it, you can also try filing a bug report: https://github.com/matplotlib/matplotlib/issues?q=is%3Aissue+label%3AOS%2FApple+close+is%3Aopen That's the current matplotlib OSX-related Open bug reports. They'll at least try to duplicate the problem and verify whether this is buggy behavior or a config issue.