How do I scale the y-axis on a histogram by the x values in R?
问题 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.) I can plot a histogram fine, but I am unsure how to scale the Y-axis by the X-value of each bin. e.g. if I have 10 particles in the 40-60 bin, I want the Y-axis value to be 10*50=500. 回答1: You would better use barplot in order to represent the total mass by the area