title: How to clean Plots (GR) without closing Julia environment
body: <p>I'm debugging a script (which use <code>Plots.jl</code> with <code>GKS QtTerm</code> backend). So I run the script many times. When I run it from terminal like <code>bash&gt; julia pointPlacement.jl</code> it takes for ages to initialize Julia and Plots.jl (this is one big inconvenience in comparison to python). Therefore I rather keep Julia open and run the script from within, like <code>julia&gt; include( "pointPlacement.jl" )</code></p>
  
  <pre><code>grid = [ [ix*0.01 iy*0.01] for ix=1:100, iy=1:100 ]
  grid = vcat(ps...)
  
  centers = hexGrid( 2, 0.2 )
  
  using Plots
  display(scatter!( grid[:,1], grid[:,2], markersize = 1, markerstrokewidth = 0, aspect_ratio=:equal ))
  display(scatter!( centers[:,1], centers[:,2], markersize = 2, markerstrokewidth = 0, aspect_ratio=:equal ))
  </code></pre>
  
  <p>The problem is that the plots accumulate. This is after 9 runs. There should be just 2 datasets, not 18:</p>
  
  <p><a href="https://i.stack.imgur.com/oUYyc.png" rel="noreferrer"><img src="https://i.stack.imgur.com/oUYyc.png" alt="enter image description here"></a></p>
  
  <p>I want to close (kill,destroy) them</p>
  
  <p>If I remove <code>!</code> like this, it helps</p>
  
  <pre><code>display(scatter( grid[:,1], grid[:,2], markersize = 1, markerstrokewidth = 0, aspect_ratio=:equal ))
  display(scatter!( centers[:,1], centers[:,2], markersize = 2, markerstrokewidth = 0, aspect_ratio=:equal ))
  </code></pre>
  
  <p>but still, I worry that some junk (previous figures) stay allocated in memory and Julia will crash after I run the script 100x. Therefore I would like to call some function like <code>clear()</code>,<code>flush()</code>,<code>closeAll()</code> ... or something ... everytime I run the script</p>