title: Plot sine curve in R
body: <p>How can I plot a generic <em>sin</em> curve in R? 
  Based on the answer of <a href="https://stackoverflow.com/questions/4369400/plot-the-shaded-region-under-y-sinx-in-r">this post</a>, I tried:</p>
  
  <pre><code>x &lt;- seq(0,pi,length.out=100)
  y &lt;- sin(x)
  plot(x,y,type="l")
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/vdlta.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vdlta.png" alt="enter image description here"></a></p>
  
  <p>Actually what I really would is this graph, produced by <code>gnuplot</code>:</p>
  
  <pre><code>plot sin(x) linestyle 1
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/LvRBI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LvRBI.png" alt="enter image description here"></a></p>
  
  <p>Furthermore, I would like to know why <code>gnuplot</code> produces a graph even if I do not assign any value to the variable <code>x</code>. Does it have a preassigned value or something else? </p>