Skip to content

figures won't update correctly using MacOSX backend #8400

Closed

Description

@js54434

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.

Activity

  1. added this to the milestone on Mar 30, 2017
  2. dstansby commented on Mar 30, 2017

    @dstansby
    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.

  3. tacaswell commented on Apr 3, 2017

    @tacaswell
    Member

    Does it work in IPython?

  4. js54434 commented on Apr 3, 2017

    @js54434
    Author

    Yes, it does seem to work in ipython 5.1.0.

  5. tacaswell commented on Apr 4, 2017

    @tacaswell
    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.

  6. modified the milestones: , on May 3, 2017
  7. dstansby commented on Jul 29, 2017

    @dstansby
    Member

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

  8. dstansby commented on Jul 29, 2017

    @dstansby
    Member

    Bisects down to fd7eeeb

  9. efiring commented on Jul 29, 2017

    @efiring
    Member

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

  10. efiring commented on Jul 29, 2017

    @efiring
    Member

    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.

  11. modified the milestones: , on Oct 9, 2017
  12. smaret commented on Feb 29, 2020

    @smaret

    This bug is still present on:

    • macOS 10.15.9
    • Python 3.7.6
    • matplotlib 3.1.3
  13. modified the milestones: needs sorting, v3.5.2 on Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions