Stem-and-Leaf Plot vs Histogram: Differences, with R Examples
How stem-and-leaf plots and histograms are alike and how they differ: exact values versus counts, small versus large datasets, finding the median. Worked in R with stem() and ggplot2.
R
Statistics
Visualization
Author
Abdullah Al Mahmud
Published
November 2, 2026
The same ten scores as a stem-and-leaf plot and as a histogram.
Stem-and-leaf plots and histograms both show the distribution of quantitative data. A stem-and-leaf plot is often described as a text-based histogram turned on its side. They serve slightly different purposes, depending on the size of the dataset and what we want to emphasise.
How They Are Similar
They show the shape of the data. We can see whether the data are symmetric, skewed to the left or right, or have several peaks.
They group data into intervals. A histogram calls them bins (such as 70–79). A stem-and-leaf plot uses the stems (such as the tens digit).
They display frequency. In a histogram it is the height of a bar; in a stem-and-leaf plot it is the length of a row of leaves.
They are for quantitative data. Neither suits categories such as eye colour or car brand.
The histogram gives the general shape and the counts (3, 4 and 3). But if we ask “did anyone score 85?”, the bars cannot tell us. The stem-and-leaf plot can: there is an 8 | 5.
When the Dataset Gets Large
With a few dozen values the stem-and-leaf plot is compact. With hundreds, the rows of leaves become very long. Here are 200 simulated scores:
set.seed(7)big <-round(rnorm(200, mean =70, sd =12))stem(big)
The decimal point is 1 digit(s) to the right of the |
4 | 2
4 | 7789
5 | 011112223444
5 | 56677788999999999
6 | 000001222233333333
6 | 55555556666667777888889999999
7 | 0000000111112222222333444444444444444
7 | 555666666666777777778888888899999999
8 | 0000011222222233333344444
8 | 55555666899
9 | 003
9 | 667789
10 | 3
It still works, but the rows are crowded and hard to scan. The histogram handles the same data cleanly: