title: How to display a plot in r in a script from the terminal
body: <p>It is possible to run a r script from the terminal:</p>
  
  <p>Let's say I have a file "message.r" which contains the following:</p>
  
  <pre><code>print("hello world")
  </code></pre>
  
  <p>I can run the script from the terminal with the the following command:</p>
  
  <pre><code>$ Rscript message.r
  [1] "hello world"
  </code></pre>
  
  <p>Let's says now that I have a script containg code for a plot names <code>plot.r</code> with the following content: </p>
  
  <pre><code>x = c(1,2,3)
  y = c(2,3,6)
  plot(x,y)
  </code></pre>
  
  <p>Entering the command </p>
  
  <pre><code>Rscript plot.r
  </code></pre>
  
  <p>nothing happens</p>
  
  <p>How to make display a plot from the terminal?</p>