<p dir="auto">OS X El Capitan + Anaconda 2.4 (Python 3.5) + matplotlib 1.4.3</p>
<p dir="auto">At <code class="notranslate">ipython</code> terminal:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [1]: import matplotlib.pyplot as plt
In [2]: plt.plot(range(5))
Out[2]: [&lt;matplotlib.lines.Line2D at 0x1085feef0&gt;]
In [3]: plt.show()"><pre class="notranslate">In [1]: import matplotlib.pyplot as plt
In [2]: plt.plot(range(5))
Out[2]: [<span class="pl-k">&lt;</span>matplotlib.lines.Line2D at 0x1085feef<span class="pl-k">0&gt;</span>]
In [3]: <span class="pl-en">plt.show</span>()</pre></div>
<p dir="auto">This works. However, if I call <code class="notranslate">plt.xkcd()</code>, things fall apart.</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [4]: plt.xkcd()
Out[4]: &lt;matplotlib.rc_context at 0x1097b3d68&gt;

In [5]: plt.plot(range(5))
Out[5]: [&lt;matplotlib.lines.Line2D at 0x10a2eb240&gt;]

In [6]: plt.show()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/Users/xiaoweiz/anaconda/lib/python3.5/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     57     def draw_wrapper(artist, renderer, *args, **kwargs):
     58         before(artist, renderer)
---&gt; 59         draw(artist, renderer, *args, **kwargs)
     60         after(artist, renderer)
     61

/Users/xiaoweiz/anaconda/lib/python3.5/site-packages/matplotlib/figure.py in draw(self, renderer)
   1083         dsu.sort(key=itemgetter(0))
   1084         for zorder, a, func, args in dsu:
-&gt; 1085             func(*args)
   1086
   1087         renderer.close_group('figure')

/Users/xiaoweiz/anaconda/lib/python3.5/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     57     def draw_wrapper(artist, renderer, *args, **kwargs):
     58         before(artist, renderer)
---&gt; 59         draw(artist, renderer, *args, **kwargs)
     60         after(artist, renderer)
     61

/Users/xiaoweiz/anaconda/lib/python3.5/site-packages/matplotlib/axes/_base.py in draw(self, renderer, inframe)
   2108
   2109         for zorder, a in dsu:
-&gt; 2110             a.draw(renderer)
   2111
   2112         renderer.close_group('axes')

/Users/xiaoweiz/anaconda/lib/python3.5/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     57     def draw_wrapper(artist, renderer, *args, **kwargs):
     58         before(artist, renderer)
---&gt; 59         draw(artist, renderer, *args, **kwargs)
     60         after(artist, renderer)
     61

/Users/xiaoweiz/anaconda/lib/python3.5/site-packages/matplotlib/lines.py in draw(self, renderer)
    713                 funcname = self.drawStyles.get(self._drawstyle, '_draw_lines')
    714                 drawFunc = getattr(self, funcname)
--&gt; 715                 drawFunc(renderer, gc, tpath, affine.frozen())
    716
    717         if self._marker:

/Users/xiaoweiz/anaconda/lib/python3.5/site-packages/matplotlib/lines.py in _draw_lines(self, renderer, gc, path, trans)
   1070
   1071     def _draw_lines(self, renderer, gc, path, trans):
-&gt; 1072         self._lineFunc(renderer, gc, path, trans)
   1073
   1074     def _draw_steps_pre(self, renderer, gc, path, trans):

/Users/xiaoweiz/anaconda/lib/python3.5/site-packages/matplotlib/lines.py in _draw_solid(self, renderer, gc, path, trans)
   1110     def _draw_solid(self, renderer, gc, path, trans):
   1111         gc.set_linestyle('solid')
-&gt; 1112         renderer.draw_path(gc, path, trans)
   1113
   1114     def _draw_dashed(self, renderer, gc, path, trans):

/Users/xiaoweiz/anaconda/lib/python3.5/site-packages/matplotlib/patheffects.py in draw_path(self, gc, tpath, affine, rgbFace)
    113         for path_effect in self._path_effects:
    114             path_effect.draw_path(self._renderer, gc, tpath, affine,
--&gt; 115                                   rgbFace)
    116
    117     def draw_markers(self, gc, marker_path, marker_trans, path, *args,

/Users/xiaoweiz/anaconda/lib/python3.5/site-packages/matplotlib/patheffects.py in draw_path(self, renderer, gc, tpath, affine, rgbFace)
    215     def draw_path(self, renderer, gc, tpath, affine, rgbFace):
    216         Stroke.draw_path(self, renderer, gc, tpath, affine, rgbFace)
--&gt; 217         renderer.draw_path(gc, tpath, affine, rgbFace)
    218
    219

/Users/xiaoweiz/anaconda/lib/python3.5/site-packages/matplotlib/backends/backend_macosx.py in draw_path(self, gc, path, transform, rgbFace)
     56             rgbFace = tuple(rgbFace)
     57         linewidth = gc.get_linewidth()
---&gt; 58         gc.draw_path(path, transform, linewidth, rgbFace)
     59
     60     def draw_markers(self, gc, marker_path, marker_trans, path, trans, rgbFace=None):

AttributeError: 'GraphicsContextBase' object has no attribute 'draw_path'"><pre class="notranslate">In [4]: <span class="pl-en">plt.xkcd</span>()
Out[4]: <span class="pl-k">&lt;</span>matplotlib.rc_context at 0x1097b3d<span class="pl-k">68&gt;</span>

In [5]: plt.plot(range(5))
Out[5]: [<span class="pl-k">&lt;</span>matplotlib.lines.Line2D at 0x10a2eb<span class="pl-k">240&gt;</span>]

In [6]: <span class="pl-en">plt.show</span>()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/Users/xiaoweiz/anaconda/lib/python3.5/site-packages/matplotlib/artist.py <span class="pl-k">in</span> draw_wrapper(artist, renderer, <span class="pl-k">*</span>args, <span class="pl-k">**</span>kwargs)
     57     def draw_wrapper(artist, renderer, <span class="pl-k">*</span>args, <span class="pl-k">**</span>kwargs):
     58         before(artist, renderer)
---<span class="pl-k">&gt;</span> 59         draw(artist, renderer, <span class="pl-k">*</span>args, <span class="pl-k">**</span>kwargs)
     60         after(artist, renderer)
     61

/Users/xiaoweiz/anaconda/lib/python3.5/site-packages/matplotlib/figure.py <span class="pl-k">in</span> draw(self, renderer)
   1083         dsu.sort(key=itemgetter(0))
   1084         <span class="pl-k">for</span> <span class="pl-smi">zorder, a, func, args</span> <span class="pl-k">in</span> dsu:
-<span class="pl-k">&gt;</span> 1085             func(<span class="pl-k">*</span>args)
   1086
   1087         renderer.close_group(<span class="pl-s"><span class="pl-pds">'</span>figure<span class="pl-pds">'</span></span>)

/Users/xiaoweiz/anaconda/lib/python3.5/site-packages/matplotlib/artist.py <span class="pl-k">in</span> draw_wrapper(artist, renderer, <span class="pl-k">*</span>args, <span class="pl-k">**</span>kwargs)
     57     def draw_wrapper(artist, renderer, <span class="pl-k">*</span>args, <span class="pl-k">**</span>kwargs):
     58         before(artist, renderer)
---<span class="pl-k">&gt;</span> 59         draw(artist, renderer, <span class="pl-k">*</span>args, <span class="pl-k">**</span>kwargs)
     60         after(artist, renderer)
     61

/Users/xiaoweiz/anaconda/lib/python3.5/site-packages/matplotlib/axes/_base.py <span class="pl-k">in</span> draw(self, renderer, inframe)
   2108
   2109         <span class="pl-k">for</span> <span class="pl-smi">zorder, a</span> <span class="pl-k">in</span> dsu:
-<span class="pl-k">&gt;</span> 2110             a.draw(renderer)
   2111
   2112         renderer.close_group(<span class="pl-s"><span class="pl-pds">'</span>axes<span class="pl-pds">'</span></span>)

/Users/xiaoweiz/anaconda/lib/python3.5/site-packages/matplotlib/artist.py <span class="pl-k">in</span> draw_wrapper(artist, renderer, <span class="pl-k">*</span>args, <span class="pl-k">**</span>kwargs)
     57     def draw_wrapper(artist, renderer, <span class="pl-k">*</span>args, <span class="pl-k">**</span>kwargs):
     58         before(artist, renderer)
---<span class="pl-k">&gt;</span> 59         draw(artist, renderer, <span class="pl-k">*</span>args, <span class="pl-k">**</span>kwargs)
     60         after(artist, renderer)
     61

/Users/xiaoweiz/anaconda/lib/python3.5/site-packages/matplotlib/lines.py <span class="pl-k">in</span> draw(self, renderer)
    713                 funcname = self.drawStyles.get(self._drawstyle, <span class="pl-s"><span class="pl-pds">'</span>_draw_lines<span class="pl-pds">'</span></span>)
    714                 drawFunc = getattr(self, funcname)
--<span class="pl-k">&gt;</span> 715                 drawFunc(renderer, gc, tpath, <span class="pl-en">affine.frozen</span>())
    716
    717         <span class="pl-k">if</span> self._marker:

/Users/xiaoweiz/anaconda/lib/python3.5/site-packages/matplotlib/lines.py <span class="pl-k">in</span> _draw_lines(self, renderer, gc, path, trans)
   1070
   1071     def _draw_lines(self, renderer, gc, path, trans):
-<span class="pl-k">&gt;</span> 1072         self._lineFunc(renderer, gc, path, trans)
   1073
   1074     def _draw_steps_pre(self, renderer, gc, path, trans):

/Users/xiaoweiz/anaconda/lib/python3.5/site-packages/matplotlib/lines.py <span class="pl-k">in</span> _draw_solid(self, renderer, gc, path, trans)
   1110     def _draw_solid(self, renderer, gc, path, trans):
   1111         gc.set_linestyle(<span class="pl-s"><span class="pl-pds">'</span>solid<span class="pl-pds">'</span></span>)
-<span class="pl-k">&gt;</span> 1112         renderer.draw_path(gc, path, trans)
   1113
   1114     def _draw_dashed(self, renderer, gc, path, trans):

/Users/xiaoweiz/anaconda/lib/python3.5/site-packages/matplotlib/patheffects.py <span class="pl-k">in</span> draw_path(self, gc, tpath, affine, rgbFace)
    113         <span class="pl-k">for</span> <span class="pl-smi">path_effect</span> <span class="pl-k">in</span> self._path_effects:
    114             path_effect.draw_path(self._renderer, gc, tpath, affine,
--<span class="pl-k">&gt;</span> 115                                   rgbFace)
    116
    117     def draw_markers(self, gc, marker_path, marker_trans, path, <span class="pl-k">*</span>args,

/Users/xiaoweiz/anaconda/lib/python3.5/site-packages/matplotlib/patheffects.py <span class="pl-k">in</span> draw_path(self, renderer, gc, tpath, affine, rgbFace)
    215     def draw_path(self, renderer, gc, tpath, affine, rgbFace):
    216         Stroke.draw_path(self, renderer, gc, tpath, affine, rgbFace)
--<span class="pl-k">&gt;</span> 217         renderer.draw_path(gc, tpath, affine, rgbFace)
    218
    219

/Users/xiaoweiz/anaconda/lib/python3.5/site-packages/matplotlib/backends/backend_macosx.py <span class="pl-k">in</span> draw_path(self, gc, path, transform, rgbFace)
     56             rgbFace = tuple(rgbFace)
     57         linewidth = <span class="pl-en">gc.get_linewidth</span>()
---<span class="pl-k">&gt;</span> 58         gc.draw_path(path, transform, linewidth, rgbFace)
     59
     60     def draw_markers(self, gc, marker_path, marker_trans, path, trans, rgbFace=None):

AttributeError: <span class="pl-s"><span class="pl-pds">'</span>GraphicsContextBase<span class="pl-pds">'</span></span> object has no attribute <span class="pl-s"><span class="pl-pds">'</span>draw_path<span class="pl-pds">'</span></span></pre></div>
<p dir="auto">But in <code class="notranslate">jupyter notebook</code> or <code class="notranslate">jupyter qtconsole</code> where <code class="notranslate">%matplotlib inline</code> works, the above issue goes away. Namely, the following works.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
%matplotlib inline
plt.xkcd()
plt.plot(range(5))"><pre class="notranslate"><span class="pl-k">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-c1">%</span><span class="pl-s1">matplotlib</span> <span class="pl-s1">inline</span>
<span class="pl-s1">plt</span>.<span class="pl-en">xkcd</span>()
<span class="pl-s1">plt</span>.<span class="pl-en">plot</span>(<span class="pl-en">range</span>(<span class="pl-c1">5</span>))</pre></div>
<p dir="auto">The matplotlib xkcd example plots at</p>
<p dir="auto"><a href="http://matplotlib.org/examples/showcase/xkcd.html" rel="nofollow">http://matplotlib.org/examples/showcase/xkcd.html</a></p>
<p dir="auto">stopped working with matplotlib 1.4.x (they used to work with earlier versions). This is with Python 2.7.5 on Mac OS X 10.9.5 and matplotlib 1.4.3.</p>
<p dir="auto">The following Traceback is printed if I run one of the examples:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
  File &quot;/Library/Python/2.7/site-packages/matplotlib/artist.py&quot;, line 59, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/figure.py&quot;, line 1085, in draw
    func(*args)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/artist.py&quot;, line 59, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/axes/_base.py&quot;, line 2110, in draw
    a.draw(renderer)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/artist.py&quot;, line 59, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/lines.py&quot;, line 715, in draw
    drawFunc(renderer, gc, tpath, affine.frozen())
  File &quot;/Library/Python/2.7/site-packages/matplotlib/lines.py&quot;, line 1072, in _draw_lines
    self._lineFunc(renderer, gc, path, trans)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/lines.py&quot;, line 1112, in _draw_solid
    renderer.draw_path(gc, path, trans)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/patheffects.py&quot;, line 115, in draw_path
    rgbFace)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/patheffects.py&quot;, line 217, in draw_path
    renderer.draw_path(gc, tpath, affine, rgbFace)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/backends/backend_macosx.py&quot;, line 58, in draw_path
    gc.draw_path(path, transform, linewidth, rgbFace)
AttributeError: GraphicsContextBase instance has no attribute 'draw_path'
Traceback (most recent call last):
  File &quot;/Library/Python/2.7/site-packages/matplotlib/artist.py&quot;, line 59, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/figure.py&quot;, line 1085, in draw
    func(*args)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/artist.py&quot;, line 59, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/axes/_base.py&quot;, line 2110, in draw
    a.draw(renderer)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/artist.py&quot;, line 59, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/axis.py&quot;, line 1119, in draw
    tick.draw(renderer)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/artist.py&quot;, line 59, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/axis.py&quot;, line 244, in draw
    self.tick1line.draw(renderer)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/artist.py&quot;, line 59, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/lines.py&quot;, line 760, in draw
    rgbaFace)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/patheffects.py&quot;, line 127, in draw_markers
    **kwargs)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/backend_bases.py&quot;, line 265, in draw_markers
    rgbFace)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/patheffects.py&quot;, line 115, in draw_path
    rgbFace)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/patheffects.py&quot;, line 217, in draw_path
    renderer.draw_path(gc, tpath, affine, rgbFace)
  File &quot;/Library/Python/2.7/site-packages/matplotlib/backends/backend_macosx.py&quot;, line 58, in draw_path
    gc.draw_path(path, transform, linewidth, rgbFace)
AttributeError: GraphicsContextBase instance has no attribute 'draw_path'"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/matplotlib/artist.py", line 59, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/matplotlib/figure.py", line 1085, in draw
    func(*args)
  File "/Library/Python/2.7/site-packages/matplotlib/artist.py", line 59, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/matplotlib/axes/_base.py", line 2110, in draw
    a.draw(renderer)
  File "/Library/Python/2.7/site-packages/matplotlib/artist.py", line 59, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/matplotlib/lines.py", line 715, in draw
    drawFunc(renderer, gc, tpath, affine.frozen())
  File "/Library/Python/2.7/site-packages/matplotlib/lines.py", line 1072, in _draw_lines
    self._lineFunc(renderer, gc, path, trans)
  File "/Library/Python/2.7/site-packages/matplotlib/lines.py", line 1112, in _draw_solid
    renderer.draw_path(gc, path, trans)
  File "/Library/Python/2.7/site-packages/matplotlib/patheffects.py", line 115, in draw_path
    rgbFace)
  File "/Library/Python/2.7/site-packages/matplotlib/patheffects.py", line 217, in draw_path
    renderer.draw_path(gc, tpath, affine, rgbFace)
  File "/Library/Python/2.7/site-packages/matplotlib/backends/backend_macosx.py", line 58, in draw_path
    gc.draw_path(path, transform, linewidth, rgbFace)
AttributeError: GraphicsContextBase instance has no attribute 'draw_path'
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/matplotlib/artist.py", line 59, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/matplotlib/figure.py", line 1085, in draw
    func(*args)
  File "/Library/Python/2.7/site-packages/matplotlib/artist.py", line 59, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/matplotlib/axes/_base.py", line 2110, in draw
    a.draw(renderer)
  File "/Library/Python/2.7/site-packages/matplotlib/artist.py", line 59, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/matplotlib/axis.py", line 1119, in draw
    tick.draw(renderer)
  File "/Library/Python/2.7/site-packages/matplotlib/artist.py", line 59, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/matplotlib/axis.py", line 244, in draw
    self.tick1line.draw(renderer)
  File "/Library/Python/2.7/site-packages/matplotlib/artist.py", line 59, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/matplotlib/lines.py", line 760, in draw
    rgbaFace)
  File "/Library/Python/2.7/site-packages/matplotlib/patheffects.py", line 127, in draw_markers
    **kwargs)
  File "/Library/Python/2.7/site-packages/matplotlib/backend_bases.py", line 265, in draw_markers
    rgbFace)
  File "/Library/Python/2.7/site-packages/matplotlib/patheffects.py", line 115, in draw_path
    rgbFace)
  File "/Library/Python/2.7/site-packages/matplotlib/patheffects.py", line 217, in draw_path
    renderer.draw_path(gc, tpath, affine, rgbFace)
  File "/Library/Python/2.7/site-packages/matplotlib/backends/backend_macosx.py", line 58, in draw_path
    gc.draw_path(path, transform, linewidth, rgbFace)
AttributeError: GraphicsContextBase instance has no attribute 'draw_path'
</code></pre></div>