title: Getting ValueError with string formatting in matplotlib.pyplot.savefig() filename argument
body: <p>Why am I getting a ValueError in matplotlib.pyplot ?. Here is my code:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  plt.plot([1,2,3,4,5,6])
  f = 1.234
  s = "number %i" % f
  print s
  plt.savefig(s)
  </code></pre>
  
  <p>so far so good. The figure is saved to a file with the name number 1 (the integer part of f)
  If however I do.</p>
  
  <pre><code>plt.plot([1,2,3,4,5,6])
  f = 1.234
  s = "number %.2f" % f
  print s
  plt.savefig(s)
  </code></pre>
  
  <p>The print statement prints 1.234 as expected whereas the plt.savefig(s) gives:</p>
  
  <blockquote>
    <p>ValueError: Format "23" is not supported. Supported formats: eps,
    jpeg, jpg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff.</p>
  </blockquote>
  
  <p>Somehow the savefig() method mixes the string formatting with the file format for saving. I am running python 2.7 with matplotlib 1.5.1</p>