<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">Opening an interactive figure with the MacOSX backend on matplotlib v2.1.0 results in a <code class="notranslate">TypeError</code></p>
<p dir="auto"><strong>Code for reproduction</strong></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [1]: import matplotlib.pyplot as plt
In [2]: plt.ion()
In [3]: fig, ax = plt.subplots()"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">1</span>]: <span class="pl-s1">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-v">In</span> [<span class="pl-c1">2</span>]: <span class="pl-s1">plt</span>.<span class="pl-en">ion</span>()
<span class="pl-v">In</span> [<span class="pl-c1">3</span>]: <span class="pl-s1">fig</span>, <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">subplots</span>()</pre></div>
<p dir="auto"><strong>Actual outcome</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [3]: fig, ax = plt.subplots()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
&lt;ipython-input-3-c49ba9de65d3&gt; in &lt;module&gt;()
----&gt; 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     &quot;&quot;&quot;
-&gt; 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():
--&gt; 556             draw_if_interactive()
    557 
    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:
--&gt; 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)
"><pre class="notranslate"><code class="notranslate">In [3]: fig, ax = plt.subplots()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
&lt;ipython-input-3-c49ba9de65d3&gt; in &lt;module&gt;()
----&gt; 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     """
-&gt; 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():
--&gt; 556             draw_if_interactive()
    557 
    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:
--&gt; 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)

</code></pre></div>
<p dir="auto"><strong>Expected outcome</strong></p>
<p dir="auto">Open an interactive figure. This worked on matplotlib v2.0.2</p>
<p dir="auto"><strong>Matplotlib version</strong></p>

<ul dir="auto">
<li>Operating system: MacOS 10.12.6 (16G29)</li>
<li>Matplotlib version: 2.1.0</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): MacOSX</li>
<li>Python version: Python 2.7.14 (default, Sep 22 2017, 00:06:07)</li>
<li>Jupyter version (if applicable):</li>
<li>Other libraries:</li>
</ul>


<p dir="auto"><code class="notranslate">python</code>, <code class="notranslate">ipython</code> and <code class="notranslate">matplotlib</code> were all installed via MacPorts</p>
<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>

<p dir="auto">TypeError for internal matplotlib code when constructing a figure with a specified figsize</p>
<p dir="auto"><strong>Code for reproduction</strong></p>

<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Paste your code here
ipython --pylab
&gt;&gt;&gt; figure(figsize=(11,5))"><pre class="notranslate"><span class="pl-c"># Paste your code here</span>
<span class="pl-s1">ipython</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-s1">pylab</span>
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-en">figure</span>(<span class="pl-s1">figsize</span><span class="pl-c1">=</span>(<span class="pl-c1">11</span>,<span class="pl-c1">5</span>))</pre></div>
<p dir="auto"><strong>Actual outcome</strong></p>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
&lt;ipython-input-1-6b0588efc287&gt; in &lt;module&gt;()
----&gt; 1 figure(figsize=(11,5))

/Users/nevay/Library/Python/2.7/lib/python/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():
--&gt; 556             draw_if_interactive()
    557 
    558         if _INSTALL_FIG_OBSERVER:

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/utils/decorators.pyc in wrapper(*args, **kw)
     41     def wrapper(*args,**kw):
     42         wrapper.called = False
---&gt; 43         out = func(*args,**kw)
     44         wrapper.called = True
     45         return out

/Users/nevay/Library/Python/2.7/lib/python/site-packages/matplotlib/backend_bases.pyc in draw_if_interactive(cls)
    183             manager = Gcf.get_active()
    184             if manager:
--&gt; 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)"><pre class="notranslate"><code class="notranslate">---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
&lt;ipython-input-1-6b0588efc287&gt; in &lt;module&gt;()
----&gt; 1 figure(figsize=(11,5))

/Users/nevay/Library/Python/2.7/lib/python/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():
--&gt; 556             draw_if_interactive()
    557 
    558         if _INSTALL_FIG_OBSERVER:

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/utils/decorators.pyc in wrapper(*args, **kw)
     41     def wrapper(*args,**kw):
     42         wrapper.called = False
---&gt; 43         out = func(*args,**kw)
     44         wrapper.called = True
     45         return out

/Users/nevay/Library/Python/2.7/lib/python/site-packages/matplotlib/backend_bases.pyc in draw_if_interactive(cls)
    183             manager = Gcf.get_active()
    184             if manager:
--&gt; 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)
</code></pre></div>
<p dir="auto"><strong>Expected outcome</strong><br>
A figure is constructed without error.</p>


<p dir="auto"><strong>Matplotlib version</strong></p>

<ul dir="auto">
<li>Operating system: Mac OSX 11.6</li>
<li>Matplotlib version: 2.1.0</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>):MacOSX</li>
<li>Python version: Python 2.7.14</li>
<li>Jupyter version (if applicable):</li>
<li>Other libraries: py27-ipython @5.4.0_0</li>
</ul>


<p dir="auto">Software installed through macports.</p>
<p dir="auto">This seems to work with just ipython</p>
<p dir="auto">ipython</p>
<blockquote>
<blockquote>
<blockquote>
<p dir="auto">import matplotlib.pyplot as plt<br>
plt.figure(figsize=(11,5))<br>
plt.show(block=False)</p>
</blockquote>
</blockquote>
</blockquote>