title: Sum all the values of a plot in R
body: <p>I have this plot:</p>
  <pre><code>pts1 &lt;- seq(-1,4, 0.005)
  plot1 &lt;- plot(pts1,dnorm(pts1),type=&quot;l&quot;, xlim=c(-4,4),xlab=&quot;&quot;,ylab=&quot;Densidad&quot;)
  
  </code></pre>
  <p>I want to sum all the values that the x-axis values take in the y-axis.</p>