title: How do I scale the y-axis on a histogram by the x values in R?
body: <p>I have some data which represents a sizes of particles. I want to plot the frequency of each binned-size of particles as a histogram, but scale the frequency but the size of the particle (so it represents total mass at that size.)</p>
  
  <p>I can plot a histogram fine, but I am unsure how to scale the Y-axis by the X-value of each bin.</p>
  
  <p>e.g. if I have 10 particles in the 40-60 bin, I want the Y-axis value to be 10*50=500.</p>