Issue 1:
OS X El Capitan + Anaconda 2.4 (Python 3.5) + matplotlib 1.4.3

At ipython terminal:

In [1]: import matplotlib.pyplot as plt
In [2]: plt.plot(range(5))
Out[2]: [<matplotlib.lines.Line2D at 0x1085feef0>]
In [3]: plt.show()

This works. However, if I call plt.xkcd(), things fall apart.

In [4]: plt.xkcd()
Out[4]: <matplotlib.rc_context at 0x1097b3d68>

In [5]: plt.plot(range(5))
Out[5]: [<matplotlib.lines.Line2D at 0x10a2eb240>]

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)
---> 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:
-> 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)
---> 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:
-> 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)
---> 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)
--> 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):
-> 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')
-> 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,
--> 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)
--> 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()
---> 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'

But in jupyter notebook or jupyter qtconsole where %matplotlib inline works, the above issue goes away. Namely, the following works.

import matplotlib.pyplot as plt
%matplotlib inline
plt.xkcd()
plt.plot(range(5))

Issue 2:
The matplotlib xkcd example plots at

http://matplotlib.org/examples/showcase/xkcd.html

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.

The following Traceback is printed if I run one of the examples:

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'