title: Saving image drawn using networkx/matplotlib to amazon s3?
body: <p>I have a question: is it possible to save an image drawn using networkx and matplotlib into Amazon s3?</p>
  
  <p>Here's an example:</p>
  
  <p><code>
      import networkx as nx
      import matplotlib.pyplot as plt</p>
  
  <pre><code>g = nx.DiGraph()
  # the graph is being build....
  
  # now i want to draw the graph.
  nx.draw_networkx(g)
  plt.savefig('retweet.png') # how do i save the image to amazon s3 ?
  </code></pre>
  
  <p></code></p>
  
  <p>So how do i save the image 'retweet.png' to amazon s3?</p>
  
  <p>I do not intend to start an large EC2 instance and save the file in it.</p>
  
  <p>Rather, I intend to run this code at PiCloud and than save the file to amazon s3.</p>
  
  <p>How do i do it ?</p>
  
  <p>Best Regards.</p>