title: matplotlib savefig - text chopped off
body: <p>Say I create a plot:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  plt.clf()
  import numpy as np
  props = np.random.randint(0,100,(200,))
  x=np.arange(1,201,1)
  plt.plot(x,props,c='k')
  plt.xlabel('blah blah blah blah blah blah\n blah blah blah blah blah')
  plt.ylabel('blah blah blah blah blah blah blah blah blah')
  fig=plt.gcf()
  fig.set_size_inches(3.75,3.75)#14, 23)
  plt.savefig('testfig.png',dpi=300)
  </code></pre>
  
  <p>When using Ipython (via Spyder), the plot presents ok. However when I looked at the saved image, it presents thus:</p>
  
  <p><a href="https://i.stack.imgur.com/1aibV.png" rel="noreferrer"><img src="https://i.stack.imgur.com/1aibV.png" alt="enter image description here"></a> </p>
  
  <p>As you can see, the text is cut off. <strong>What is recommended practice for dealing with this?</strong></p>
  
  <p>I have got round it by increasing the figure size, and re-sizing afterwards. However, my aim is to produce a set of images with a consistent text size (figure size varies); so this approach is not ideal.</p>
  
  <p><strong>Note.</strong> Whilst <a href="https://stackoverflow.com/questions/6774086">a similar question</a> exists, this question is distinct in that it:</p>
  
  <ul>
  <li>deals with both <code>xlabel</code> and <code>ylabel</code>.  </li>
  <li>combines with <code>set_size_inches</code>function</li>
  <li>seeks to ensure consistent text size with differing figure sizes.</li>
  <li>seeks to find out why Ipython output differs
  from savefig</li>
  </ul>