title: How to save all graphs from Rstudio History
body: <p>I m looking for a way to save all the graph from the plot windows in the Rstudio GUI.</p>
  
  <p>example :</p>
  
  <pre><code>require(ggplot2)
  qplot(mpg, wt, data = mtcars)
  qplot(mpg, wt, data = mtcars, colour = cyl)
  qplot(mpg, wt, data = mtcars, size = cyl)
  qplot(mpg, wt, data = mtcars, facets = vs ~ am)
  </code></pre>
  
  <p>I now have 4 graph in the plot windows.. I want to save each plot into a file.
  I tried ggsave, the "plot" parameter in ggsave seems to be promissing , but I dont find how to browse all available plots in RstudioGD.</p>
  
  <p>Any idea ?</p>
  
  <p>edit :
  I know I can do this :</p>
  
  <pre><code>a&lt;-qplot(mpg, wt, data = mtcars)
  b&lt;-qplot(mpg, wt, data = mtcars, colour = cyl)
  c&lt;-qplot(mpg, wt, data = mtcars, size = cyl)
  d&lt;-qplot(mpg, wt, data = mtcars, facets = vs ~ am)
  ggsave(a ...)
  ggsave(b ...)
  </code></pre>
  
  <p>But I dont want to create R objet.</p>