Skip to content

figures won't update correctly using MacOSX backend #8400

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

Closed
js54434 opened this issue Mar 29, 2017 · 9 comments · Fixed by #22179
Closed

figures won't update correctly using MacOSX backend #8400

js54434 opened this issue Mar 29, 2017 · 9 comments · Fixed by #22179

Comments

@js54434
Copy link

js54434 commented Mar 29, 2017

Bug report

Bug summary

If I use the MacOSX backend in Mac OS X 10.11.6, matplotlib version 2.0.0, using "pythonw" as installed by anaconda, in the interactive mode (after running plt.ion()) in a normal Mac OS X terminal, then the initial plot may display fine, but attempts to interact with the plot result in unresponsiveness. If you attempt to adjust the plot by clicking on, e.g., the "scale" button below the plot and right-clicking and dragging the cursor on the plot to scale it, then nothing happens until you type some keys in the terminal, at which point it'll update, but then the terminal and the plot will become unresponsive until you execute Ctrl-C.

Code for reproduction

import matplotlib.pyplot as plt
plt.ion()
plt.figure()
plt.plot([1], 'ko')    # plot a point

Actual outcome

After executing that code and try to adjust the figure by scaling or zooming in, nothing will happen. If you start typing, then the figure will update, but then the terminal and figure become unresponsive until you press Ctrl-C.

Expected outcome

Attempts to adjust the plot should have an instantaneous response with no unresponsiveness afterwards.

Matplotlib version

matplotlib 2.0.0

python info:
Python 3.5.2 |Anaconda custom (x86_64)| (default, Jul 2 2016, 17:52:12)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin

platform:
Mac OS X 10.11.6

I installed everything using anaconda.

@tacaswell tacaswell added this to the 2.0.1 (next bug fix release) milestone Mar 30, 2017
@dstansby
Copy link
Member

Can confirm this on

  • Current master (2.0.0.post3871+gf9e0b9251)
  • Pyton 3.6
  • OSX 10.12.3

The entire plotting window is disabled, including the close/minimize/maximize buttons at the top.

@tacaswell
Copy link
Member

Does it work in IPython?

@js54434
Copy link
Author

js54434 commented Apr 3, 2017

Yes, it does seem to work in ipython 5.1.0.

@tacaswell
Copy link
Member

Ah, great, so that narrows down the issue. Did this used to work with 1.5.x?

Attn @mdehoon for mac related GUI integration issues.

@QuLogic QuLogic modified the milestones: 2.0.1 (next bug fix release), 2.0.2 (next bug fix release) May 3, 2017
@dstansby
Copy link
Member

Just had a quick check, and the above snippet works fine with 1.5.3 on OSX.

@dstansby
Copy link
Member

Bisects down to fd7eeeb

@efiring
Copy link
Member

efiring commented Jul 29, 2017

@cimarronm, the commit is from your #6521 PR; maybe you can see how to modify it to handle the use case here.

@efiring
Copy link
Member

efiring commented Jul 29, 2017

Presumably the isEqualToString:@"Python" is too restrictive; something is needed that will also match "pythonw", but I have no idea how to do this in ObjectiveC.

@tacaswell tacaswell modified the milestones: 2.1.1 (next bug fix release), 2.2 (next feature release) Oct 9, 2017
@smaret
Copy link

smaret commented Feb 29, 2020

This bug is still present on:

  • macOS 10.15.9
  • Python 3.7.6
  • matplotlib 3.1.3

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

Successfully merging a pull request may close this issue.

6 participants