How a stem-and-leaf plot is built
Pick a leaf unit u, such as 1 or 0.1. Divide each value by u and round to a whole number. The last digit is the leaf and the remaining digits are the stem. With u = 1, the value 47 has stem 4 and leaf 7, written 4 | 7.
Stems are listed in order down the left side, including empty stems, and each value's leaf is written to the right of its stem in increasing order. The result shows the shape of the distribution like a sideways histogram, but every original value can still be read back.
Worked example
The data 12, 15, 21, 24, 24, 27, 31, 33, 38, 38, 38, 42, 45, 51, 56 has whole-number values, so the leaf unit is 1. The plot has five stems: 1 | 2 5, 2 | 1 4 4 7, 3 | 1 3 8 8 8, 4 | 2 5 and 5 | 1 6.
The longest row is the 30s, and the median (the 8th of 15 values) is 33. The key 1 | 2 = 12 tells a reader how to decode each row.
Leaf units, split stems and negatives
Automatic mode keeps the decimal places in your data, then widens the leaf unit until there are no more than 30 stem rows. When a value has more precision than the leaf unit, it is rounded to the nearest unit and the result says so.
Split stems put leaves 0–4 and 5–9 on separate rows, which spreads out data that crowds onto a few stems. Negative values get stems such as −1 and −0, ordered from the most negative, so −12 appears as −1 | 2.