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

Matplotlib window freezes using intreractive plot in qtconsole #1872

Closed
napopa opened this issue Jun 7, 2012 · 5 comments
Closed

Matplotlib window freezes using intreractive plot in qtconsole #1872

napopa opened this issue Jun 7, 2012 · 5 comments
Milestone

Comments

@napopa
Copy link

napopa commented Jun 7, 2012

Hi,

I'm using ipython stable release, python 2.7.3 and matplotlib 1.1.0, everything installed with homebrew and pip on Mac OS 10.7.4

If I start Ipython with the qtconsole and activate the ion() interactive mode, plotting something would cause the matplotlib window to pup up and freeze without actually displaying anything more that the grey background. This happens with both the PySide and MacOSX backends. To close the plot window I have to close ipython.
If i try the same steps in a shell-based ipython prompt everything works.

@fperez
Copy link
Member

fperez commented Jun 7, 2012

Are you starting the matplotlib support by providing the --pylab startup flag or calling the %pylab magic?

@napopa
Copy link
Author

napopa commented Jun 7, 2012

I was manually importing pylab with

from pylab import *

as I do in any standard python console. This works in a shell-based ipython but not in qtconsole.
Providing the pylab switch or the magic %pylab both make the interactive plotting work in the qtconsole as well.

Is this an expected behaviour ?

@fperez
Copy link
Member

fperez commented Jun 7, 2012

Yes. The fact that not using pylab works is an accident that's OS and backend dependent and can't be relied upon. The only officially supported way of using matplotlib interactively with possibly multiple plots and a fully non-blocking window is to use --pylab or %pylab.

Closing as not a bug.

@fperez fperez closed this as completed Jun 7, 2012
@napopa
Copy link
Author

napopa commented Jun 7, 2012

I see, thanks for clarifying!

@Alexis-benoist
Copy link

Hello,

I'm having the same issue. What do you mean by the --pylabflag, does what I did below seems reasonable?

capture d ecran 2015-07-30 a 10 46 48

Thank you in advance!

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

No branches or pull requests

3 participants