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
figures won't update correctly using MacOSX backend #8400
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
importmatplotlib.pyplotaspltplt.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
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.
Activity
dstansby commentedon Mar 30, 2017
Can confirm this on
2.0.0.post3871+gf9e0b9251)The entire plotting window is disabled, including the close/minimize/maximize buttons at the top.
tacaswell commentedon Apr 3, 2017
Does it work in IPython?
js54434 commentedon Apr 3, 2017
Yes, it does seem to work in ipython 5.1.0.
tacaswell commentedon Apr 4, 2017
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.
dstansby commentedon Jul 29, 2017
Just had a quick check, and the above snippet works fine with 1.5.3 on OSX.
dstansby commentedon Jul 29, 2017
Bisects down to fd7eeeb
efiring commentedon 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 commentedon 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.smaret commentedon Feb 29, 2020
This bug is still present on: