title: SVG rendering issues using iPython inline plots
body: <p>when I use inline plots in iPython (QtConsole), the first plot looks (more or less) fine, but then it gets weirder and weirder. When I plot something several times (so plot, see it displayed, plot again, see output etc.), it looks like it is being overlaid with the skewed previous picture. So after plotting a diagonal line (x=y) 4 times in a row I get something like this <img src="https://i.stack.imgur.com/WgbIk.png" alt="enter image description here"></p>
  
  <p>If i right click and export it as svg everything looks good <img src="https://i.stack.imgur.com/dPm12.png" alt="enter image description here"></p>
  
  <p>(Exported PNG picture remains wrecked as the first one). 
  I guess the problem is similar to <a href="https://github.com/ipython/ipython/issues/1866" rel="nofollow noreferrer">https://github.com/ipython/ipython/issues/1866</a>, but I didn't got the upshot of the discussion (it got too technical and complicated for me to follow).
  Is there any solution or work around for this issue? </p>
  
  <p>I'm using </p>
  
  <pre><code>python 2.7
  matplotlib 1.4.1
  IPython 2.1.0
  </code></pre>
  
  <p>Here is a working example:</p>
  
  <pre><code>%matplotlib inline
  % config InlineBackend.figure_format = 'svg'
  import matplotlib.pyplot as plt
  a=range(10)
  fig,ax=plt.subplots()
  ax.plot(a,a)
  ax.axis('off')
  </code></pre>
  
  <p>if you remove <code>plt.axis('off')</code> line, weird things happen only outside of the axis box.</p>
  
  <p>P.S. Originally I encountered this problem in connection with drawing graphs with <code>networkx</code>. If I use <code>draw</code> from <code>networkx</code> this problem does not occur. If I use <code>draw_networkx</code>, same as described above happens. That might point to the core of the problem... I'm trying to figure out what line of code makes one work better than the other...</p>