title: Text or legend cut from matplotlib figure on savefig()
body: <p>Say I want to plot a very simple figure with 2-subplot laid out horizontally, and I want to add some text on the right of the second subplot. I am working in Jupyter Notebook, but this shouldn't change anything:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  %matplotlib inline
  
  plt.figure(figsize=(8, 3))
  
  ax1 = plt.subplot(121)
  ax1.plot(x,y1)
  
  ax2 = plt.subplot(122)
  ax2.plot(x,y2)
  ax2.text(1.05,0.7, 'Some text here', horizontalalignment='left', transform=ax2.transAxes)
  </code></pre>
  
  <p>The displayed output is just as I want it:
  <a href="https://i.stack.imgur.com/GTGD0.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/GTGD0.jpg" alt="Display, which is what I want"></a></p>
  
  <p>However, when I try to export the figure, the text to the right get cut:</p>
  
  <pre><code>plt.savefig(r'C:\mypy\test_graph.png', ext='png');
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Y8ipC.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Y8ipC.png" alt="Not what I want, but what gets saved"></a></p>
  
  <p>Using <code>plt.tightlayout()</code>, as suggested <a href="https://stackoverflow.com/questions/33904163/x-axis-label-gets-cut-off-of-graph-python-matplotlib">here</a> makes the problem worse. </p>
  
  <p>How can I best resolve this?</p>