Skip to content

Mac: Save button not working on 1.5.0 or 2.x with backend.qt4 in ipython 4 #5689

Closed

Description

@JCorson

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.

Activity

  1. added this to the milestone on Dec 17, 2015
  2. tacaswell commented on Dec 17, 2015

    @tacaswell
    Member

    just to confirm, this is a regression from 1.4.3?

  3. jdmarch commented on Dec 17, 2015

    @jdmarch

    I can reproduce on 1.4.3

  4. tacaswell commented on Dec 17, 2015

    @tacaswell
    Member

    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

  5. self-assigned this
    on Dec 21, 2015
  6. mdboom commented on Dec 21, 2015

    @mdboom
    Member

    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?

  7. mdboom commented on Dec 21, 2015

    @mdboom
    Member

    Nevermind, if I run in IPython, I can reproduce. Regular Python interpreter works, though.

  8. tacaswell commented on Dec 22, 2015

    @tacaswell
    Member

    I wonder if this is related to the ipython inputhook?

    On Mon, Dec 21, 2015, 16:43 Michael Droettboom notifications@github.com
    wrote:

    Nevermind, if I run in IPython, I can reproduce. Regular Python
    interpreter works, though.

    —
    Reply to this email directly or view it on GitHub
    #5689 (comment)
    .

  9. mdboom commented on Dec 22, 2015

    @mdboom
    Member

    That's my suspicion, but I haven't had much time to look at it.

  10. added 2 commits that reference this issue on Dec 23, 2015
    d041565
    2695ea5
  11. mdboom commented on Dec 23, 2015

    @mdboom
    Member

    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.

  12. 9 remaining items

  13. modified the milestones: , on Jan 25, 2016
  14. efiring commented on Jun 20, 2016

    @efiring
    Member

    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?

  15. tacaswell commented on Jun 20, 2016

    @tacaswell
    Member

    I think this may be a OSX specific issue as well. It works correctly on linux.

  16. minrk commented on Jun 20, 2016

    @minrk
    Contributor

    I'll see what I can find out.

  17. tiagopereira commented on Oct 5, 2016

    @tiagopereira

    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.

  18. 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
  19. 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
  20. efiring commented on Dec 23, 2016

    @efiring
    Member

    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.

  21. modified the milestones: , on May 3, 2017
  22. anntzer commented on Jun 29, 2017

    @anntzer
    Contributor

    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.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions