title: How to display the Plots by executing the file from command line
body: <p>I'm trying to execute the below code that display a plot:</p>
  
  <pre><code>using Plots, Measures
  pyplot()
  
  data = [rand(100), rand(100)];
  
  histogram(data, layout = 2,
            title = ["Dataset A" "Dataset B"], legend = false,
            ylabel = "ylabel", margin = 5mm)
  </code></pre>
  
  <p>I do not get any output once I execute it from the command line!!</p>
  
  <p><a href="https://i.stack.imgur.com/kODmT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kODmT.png" alt="enter image description here"></a> </p>
  
  <p>Knowing that I tried it in 3 different ways and it works (Jupyter, Juni, Julia session), though I'm confused about the way it works in the <code>Juno</code>, kinldy see my observations below:</p>
  
  <p>With <code>Jupyter</code> it is functioning perfectly:</p>
  
  <p>With Juno, I've to run the file TWICE!! the first time looks to be for compilation, second time for execution, maybe!!
  And if I closed the plot, I've to close the Julia session, restart it, then re-execute the file TWICE!! and sometimes nothing is appearing!!</p>
  
  <p>With Julia session, it take time for first time execution, then if I closed the plot and run it again, it is appearing smoothly.</p>
  
  <p><a href="https://i.stack.imgur.com/Ufggq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ufggq.png" alt=""></a></p>
  
  <p><a href="https://i.stack.imgur.com/oBKa1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oBKa1.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/8VtV3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8VtV3.png" alt="enter image description here"></a></p>