title: Julia: How to save a figure without plotting/displaying it in PyPlot?
body: <p>I am using the PyPlot package in Julia to generate and save several figures. My current approach is to display the figure and then save it using <code>savefig</code>.</p>
  
  <pre><code>using PyPlot
  a = rand(50,40)
  imshow(a)
  savefig("a.png")
  </code></pre>
  
  <p>Is there a way to save the figure without having to first display it?</p>