You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mac: Save button not working on 1.5.0 or 2.x with backend.qt4 in ipython 4 #5689
When trying to save a figure in matplotlib 1.5.0 with backend:Qt4Agg and backend.qt4:PySide the save button is not functional. The save dialog opens and then immediately closes.
# Use %matplotlib to prevent segfault reported in issue #5687
%matplotlib
import matplotlib.pyplot as plt
plt.plot(range(10))
Click the save button. plt.savefig() still works.
I have been able to reproduce this behavior on Mac (OSX 10.11) in both Enthought and Anaconda's matplotlib 1.5.0.
Sorry -- I think I introduced confusion by not being clear enough in the PR descriptions. d041565 doesn't fix this bug. This bug has to do with the save dialog displaying briefly. d041565 (and #5720) fix a bug that only happens after the user has had a chance to select a filename and begin drawing and saving the file. I've been poking at this bug without any success -- I think it's something pretty low-level in how the IPython input hook is set up, and (I think) used to work and recent PySide changes broke it.
I had this problem with both PySide and PyQt. However, updating to IPython 5.1.0 seems to solve the issue. Also improves the window redraw when resized on qt5.
changed the title [-]Mac: Save button not working on 1.5.0 with backend.qt4:PySide[/-][+]Mac: Save button not working on 1.5.0 or 2.x with backend.qt4[/+]on Dec 23, 2016
changed the title [-]Mac: Save button not working on 1.5.0 or 2.x with backend.qt4[/-][+]Mac: Save button not working on 1.5.0 or 2.x with backend.qt4 in ipython 4[/+]on Dec 23, 2016
I can reproduce it using ipython with or without '--pylab' or any gui magic (plt.ion()), but not at the ordinary python prompt, where plt.ion() is now sufficient for interactivity. This is with ipython 4.0.3, so given the report above, it may be something we don't have to worry about, as newer ipython versions come into use.
Activity
tacaswell commentedon Dec 17, 2015
just to confirm, this is a regression from 1.4.3?
jdmarch commentedon Dec 17, 2015
I can reproduce on 1.4.3
tacaswell commentedon Dec 17, 2015
ok, so not a regression.
This is tickling something in the back of my mind as having seen this before and it getting fixed, but details are not forth coming.
attn @mfitzp
mdboom commentedon Dec 21, 2015
I can't seem to reproduce with Homebrew Python 2.7.11 and pyside. What Python are you using and how did you install PySide?
mdboom commentedon Dec 21, 2015
Nevermind, if I run in IPython, I can reproduce. Regular Python interpreter works, though.
tacaswell commentedon Dec 22, 2015
I wonder if this is related to the ipython inputhook?
On Mon, Dec 21, 2015, 16:43 Michael Droettboom notifications@github.com
wrote:
mdboom commentedon Dec 22, 2015
That's my suspicion, but I haven't had much time to look at it.
Merge pull request #5720 from mdboom/fix-save-button
Merge pull request #5720 from mdboom/fix-save-button
mdboom commentedon Dec 23, 2015
Sorry -- I think I introduced confusion by not being clear enough in the PR descriptions. d041565 doesn't fix this bug. This bug has to do with the save dialog displaying briefly. d041565 (and #5720) fix a bug that only happens after the user has had a chance to select a filename and begin drawing and saving the file. I've been poking at this bug without any success -- I think it's something pretty low-level in how the IPython input hook is set up, and (I think) used to work and recent PySide changes broke it.
9 remaining items
efiring commentedon Jun 20, 2016
This is not a pyside-specific issue; I see it with an Anaconda installation using pyqt 4.11.4. @minrk, any chance you can look into this?
tacaswell commentedon Jun 20, 2016
I think this may be a OSX specific issue as well. It works correctly on linux.
minrk commentedon Jun 20, 2016
I'll see what I can find out.
tiagopereira commentedon Oct 5, 2016
I had this problem with both PySide and PyQt. However, updating to IPython 5.1.0 seems to solve the issue. Also improves the window redraw when resized on qt5.
[-]Mac: Save button not working on 1.5.0 with backend.qt4:PySide[/-][+]Mac: Save button not working on 1.5.0 or 2.x with backend.qt4[/+][-]Mac: Save button not working on 1.5.0 or 2.x with backend.qt4[/-][+]Mac: Save button not working on 1.5.0 or 2.x with backend.qt4 in ipython 4[/+]efiring commentedon Dec 23, 2016
I can reproduce it using ipython with or without '--pylab' or any gui magic (
plt.ion()), but not at the ordinary python prompt, whereplt.ion()is now sufficient for interactivity. This is with ipython 4.0.3, so given the report above, it may be something we don't have to worry about, as newer ipython versions come into use.anntzer commentedon Jun 29, 2017
Closing as the last report is that this is fixed with recent ipython versions. Feel free to reopen if still present with even more recent ipythons.