title: How to draw the curves in an energy diagram in R?
body: <p>I wrote following R script:</p>
  
  <pre><code>#energy diagram
  x &lt;- c(0.1, 0.3, 0.5, 0.7, 0.9 )    #chosen randomly, reaction axis
  y &lt;- c(-5.057920, -5.057859, -5.057887,-5.057674, -5.057919 ) #energy of the educt, intermediate, transtition states and product 
  plot(x,y, type="p",
       xlim=c(0,1),
       ylim=c(-5.058,-5.0575),
       xlab="reaction axis",
       ylab=expression(paste(E[el] ," / ",10^6," ",kJ/mol)),
       xaxt="n"        #hide x-axis
       )
  #h- and v-lines, so i can draw curves by hand
  abline(v=seq(0,1,0.1),h=seq(-5.0600,-5.0500,0.00005),col="black",lty=1,lwd=1)
  abline(h=c(-5.057920, -5.057859, -5.057887,-5.057674), col="blue", lty=1,lwd=0.7)
  </code></pre>
  
  <p>Is it possible to draw a curve through the points that would look like a energy diagram. An example of an energy diagram is here: <img src="https://i.stack.imgur.com/h9jBB.gif" alt="Energy diagram as an example"></p>