Closed
Description
Bug report
Bug summary
matplotlib 2.1.0 from ipython with backend macosx ->
need _BackendMac, got FigureManagerMac
Code for reproduction
# Paste your code here
#
#
import sys
import matplotlib as mpl
import matplotlib.pyplot as pl
print "matplotlib.__version__ :", mpl.__version__
print "pl.rcParams['backend'] :", pl.rcParams["backend"]
print "sys.version :", sys.version
# -> /Library/Frameworks/Python.framework/Versions/2.7/bin/python
# a framework build ? https://matplotlib.org/faq/osx_framework.html
fig, ax = pl.subplots()
Actual outcome
# If applicable, paste the console output here
#
#
IPython
matplotlib.__version__ : 2.1.0
pl.rcParams['backend'] : MacOSX
sys.version : 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 12:01:12)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/Users/bz/py/etc/plot/mpl210.py in <module>()
19
20
---> 21 fig, ax = pl.subplots()
22
/Library/Python/2.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,
/Library/Python/2.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()
557
558 if _INSTALL_FIG_OBSERVER:
/Library/Python/2.7/site-packages/matplotlib/backend_bases.py in draw_if_interactive(cls)
183 manager = Gcf.get_active()
184 if manager:
--> 185 cls.trigger_manager_draw(manager)
186
187 @classmethod
TypeError: unbound method trigger_manager_draw() must be called with _BackendMac instance as first argument (got FigureManagerMac instance instead)
Expected outcome
used to work: 2.0.2
Matplotlib version
- Operating system: 10.8.3
- Matplotlib version: 2.1.0
- Matplotlib backend (
print(matplotlib.get_backend())
): macosx - Python version: 2.7.14
- Jupyter version (if applicable):
- Other libraries:
pip install --upgrade --user matplotlib
python.org python-2.7.14-macosx10.6.pkg
Sorry if this a "framework build issue" which I don't understand, but 2.0.2 worked.
Also, kudos for the improved doc in 2.1 !
Metadata
Metadata
Assignees
Labels
No labels