title: Matplotlib, alternatives to savefig() to improve performance when saving into a CString object?
body: <p>I am trying to speed up the process of saving my charts to images. Right now I am creating a cString Object where I save the chart to by using savefig; but I would really, really appreciate any help to improve this method of saving the image. I have to do this operation dozens of times, and the savefig command is very very slow; there must be a better way of doing it. I read something about saving it as uncompressed raw image, but I have no clue of how to do it. I don't really care about agg if I can switch to another faster backend too.</p>
  
  <p>ie:</p>
  
  <pre><code>RAM = cStringIO.StringIO()
  
  CHART = plt.figure(.... 
  **code for creating my chart**
  
  CHART.savefig(RAM, format='png')
  </code></pre>
  
  <p>I have been using matplotlib with FigureCanvasAgg backend. </p>
  
  <p><strong>Thanks!</strong></p>