# What is the correct way to plot histogram?

When we plot the frequency histogram, the frequency is equal to the area of the bar or the height of the bar? Is $\text{height} = \frac{\text{frequency}}{\text{size of the class}}$ ? If so, then how to label the vertical axis?

For example, based on the following data,

Class   Frequency
[0,9)      10
[10,19)    20
[20,39)    40


Then what is the label for vertical axis? Is it "frequency" or "frequency density"? The height of first class is 10 or 1.0? For the 3rd class, is it 20, 2.0, or 40?

Based on the information I studied from several links, when the width of the class is different, one needs to use "Frequency density" for the vertical axis. Then, $\text{frequency} = \text{height} \times \text{width of the class}$

If the class are in the same width, then one can use "Frequency" for the vertical axis, then all the heights of the bars are point to the value directly.

-
 I don't think there is much I can tell you that is not already well-explained in :en.wikipedia.org/wiki/Histogram. The idea is that there is some proportionality between the height at the value $x_0$ in the horizontal axis, and the total frequency, then, if the frequency of $x_1$ is twice that of $x_0$ the height of the bar along $x_1$ should be twice that of $x_0$ , e.g., if you plot the frequency of rainy days/week in a given year, so that x=0,1,..,7 , and y=0,..,365, and the value $x=2$ is 70 and $x=3$ is 140, then the bar above $x=3$ should be twice-as-high as that above $x=2$. – gary Sep 7 '11 at 4:33 But you can use either frequency or relative frequency, as you said, as long as you respect the proportionality principle. If you use net frequency, the units on the y-axis would be just the units used for the variable y, e.g., days of rain, lbs (e.g., if doing a histogram for the weights of a collection of students ). If you are doing a relative frequency histogram, then you just use % . – gary Sep 7 '11 at 4:38

The units on the vertical axis should be the reciprocal of the units on the horizontal axis, since when you multiply them to get probability, it needs to be dimensionless. For example, if $x$ is in inches, $y$ is in units per inch or percent per inch.