Skip to content
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

Opening an interactive figure doesn't work on MacOSX backend with matplotlib v2.1 #9489

tmdavison opened this issue Oct 20, 2017 · 2 comments


None yet
2 participants
Copy link

commented Oct 20, 2017

Bug report

Bug summary

Opening an interactive figure with the MacOSX backend on matplotlib v2.1.0 results in a TypeError

Code for reproduction

In [1]: import matplotlib.pyplot as plt
In [2]: plt.ion()
In [3]: fig, ax = plt.subplots()

Actual outcome

In [3]: fig, ax = plt.subplots()
TypeError                                 Traceback (most recent call last)
<ipython-input-3-c49ba9de65d3> in <module>()
----> 1 fig, ax = plt.subplots()

/opt/local/Library/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages/matplotlib/pyplot.pyc in subplots(nrows, ncols, sharex, sharey, squeeze, subplot_kw, gridspec_kw, **fig_kw)
   1177     subplot
   1178     """
-> 1179     fig = figure(**fig_kw)
   1180     axs = fig.subplots(nrows=nrows, ncols=ncols, sharex=sharex, sharey=sharey,
   1181                        squeeze=squeeze, subplot_kw=subplot_kw,

/opt/local/Library/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages/matplotlib/pyplot.pyc in figure(num, figsize, dpi, facecolor, edgecolor, frameon, FigureClass, clear, **kwargs)
    554         # FigureManager base class.
    555         if matplotlib.is_interactive():
--> 556             draw_if_interactive()
    558         if _INSTALL_FIG_OBSERVER:

/opt/local/Library/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages/matplotlib/backend_bases.pyc in draw_if_interactive(cls)
    183             manager = Gcf.get_active()
    184             if manager:
--> 185                 cls.trigger_manager_draw(manager)
    187     @classmethod

TypeError: unbound method trigger_manager_draw() must be called with _BackendMac instance as first argument (got FigureManagerMac instance instead)

Expected outcome

Open an interactive figure. This worked on matplotlib v2.0.2

Matplotlib version

  • Operating system: MacOS 10.12.6 (16G29)
  • Matplotlib version: 2.1.0
  • Matplotlib backend (print(matplotlib.get_backend())): MacOSX
  • Python version: Python 2.7.14 (default, Sep 22 2017, 00:06:07)
  • Jupyter version (if applicable):
  • Other libraries:

python, ipython and matplotlib were all installed via MacPorts


This comment has been minimized.

Copy link

commented Oct 20, 2017

Thanks for reporting this and sorry for the bug!

I think this is a duplicate of #9366 and #9345 which is fixed by #9347 which will be included in 2.1.1 which will be released sometime in the next week or two.

Please ping to have this re-opened if you can reproduce this on the v2.1.x or master branches.

@tacaswell tacaswell closed this Oct 20, 2017


This comment has been minimized.

Copy link
Contributor Author

commented Oct 20, 2017

Hi @tacaswell, thank you for your reply. Yes, I can confirm I can no longer reproduce this on the master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.