-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Edit axis with multiple figures causes freeze with Qt5 on Windows #7688
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
Comments
Can you reproduce this not in spyder (either in plain python or ipython prompts)? Are there any other tracking issues for this on other projects? attn @anntzer @ccordoba12 |
No other projects are currently tracking this issue. In the WinPython project, I gave this issue as the reason why I continue to need PyQt4 for now. I tried to execute in plain python and by configuring Spyder's run settings to execute in an external System terminal. In both cases, tkinter is used as the backend instead of Qt, and only one figure window displays at a time (I have to close one figure window to see the next, and I can't go back). matplotlib's figure edit menu is totally different with tkinter. I don't see the same problem with tkinter, but then tkinter is not usable for me since I can't navigate between multiple figure windows. Qt plots support many more features that I depend on. How do I get matplotlib to use the Qt backend and support multiple simultaneous figure windows when using plain python? WinPython has a convenient Command Prompt that sets up the PATH environment variable for me. Or is this problem tied to Spyder because it depends on Spyder plot support functions? |
I cannot reproduce the issue with python 3.5.2, matplotlib 1.5.3, pyqt 5.6.0, spyder 3.0.2 (all from conda). The script I tried is
|
@hiccup7 See http://matplotlib.org/faq/usage_faq.html#what-is-a-backend for all of the ways to change the backend. You will need to call |
I have not yet had time to reproduce the problem outside Spyder or produce a simple example script. Today, however, I reproduced the problem using the latest versions in WinPython 3.5.3.0Qt5:
Again, I worked around the problem by reverting Qt:
|
This seems to be a Windows problem (I can't reproduce it on Linux). I'll take a look at it. @hiccup7, does this problem appear on Spyder IPython console? Or just the Python one? |
I have not tried the Spyder IPython console. I always use the Spyder Python console. |
Could you try in the IPython one, please? I'm sorry to say it but we're about to remove the Python console in the coming months because it has a lot of very, very hard to fix bugs. |
I tried the Spyder IPython console. By default, this creates in-line plots within the console. I strongly prefer a separate window for each plot, and the Python console provides this. I need to selectively expand plots to full screen and choose among existing plot windows to view them side-by-side for comparison of processing algorithms. This is just like the visualizations I do in MATLAB. I found this: http://stackoverflow.com/questions/14261903/how-can-i-open-the-interactive-matplotlib-window-in-ipython-notebook In my latest working configuration (Python 3.5.3, Spyder 3.1.2, matplotlib 2.0.0, Qt 4.8.7, PyQt4 4.11.4), if I change the Run Settings to "Execute in current Python or IPython console" and then click (move focus) to an IPython console, Spyder crashes. |
I resolved this issue by configuring Spyder to run scripts in IPython, and for Spyder's IPython backend to Automatic (instead of Inline). Thanks @ccordoba12 for suggesting IPython! |
My Python script executes in a new dedicated Python console in Spyder, where I have configured Spyder's run options to allow interaction with the dedicated Python console after execution. After execution, my script leaves multiple figure windows open and minimized. I do the following:
matplotlib minimizes the window I just edited, then freezes. When I click on another figure window, the figure window I just edited pops up instead. When I try to edit the axis parameter of the same figure again, I hear the Windows error beep sound.
I use 64-bit WinPython on Windows 8.1. WinPython uses wheels from http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib
I have observed this problem in:
a) Python 3.5.2, Spyder 3.0.2, matplotlib 1.5.3, Qt 5.7.0, PyQt5 5.7
b) Python 3.5.2, Spyder 3.1.0dev, matplotlib 2.0.0rc2, Qt 5.7.0, PyQt5 5.7
c) Python 3.4.4, Spyder 3.0.2, matplotlib 1.5.3, Qt 5.5.1, PyQtt 5.5.1
The problem is a regression, because my same script works fine in:
d) Python 3.5.2, Spyder 2.3.9, matplotlib 1.5.3, Qt 4.8.7, PyQt4 4.11.4
e) Python 3.5.2, Spyder 3.1.0dev, matplotlib 2.0.0rc2, Qt 4.8.7, PyQt4 4.11.4
The text was updated successfully, but these errors were encountered: