title: saving figure with resizing in matplotlib
body: <p>While displaying my plot in matplotlib, I'm also trying to save it as a png using different dimensions.  I'm making a copy of my main figure (print_fig = fig), and then changing the print_fig size (print_fig.set_size_inches(7,3)).  However this applies changes my original fig instead of just print_fig.  Is there any way I can 'clone' a figure object?</p>
  
  <p>My code looks something like this:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  
  x = np.arange(10)
  
  fig = plt.figure()
  ax = plt.subplot(111)
  ax.set_ylabel("y-label")
  
  for i in xrange(5):
      ax.plot(x, i * x, label='$y = %ix$' % i)
  
  ax.legend()
  #change dimension of figure for print 
  #clone fig displayed
  print_fig = fig
  print_fig.set_size_inches(7,3)
  print_fig.savefig('print_fig.png')
  plt.show()
  </code></pre>
  
  <p>this is what my screen looks like:
  <img src="https://i.stack.imgur.com/Pfi2i.png" alt="enter image description here"></p>