Stem-and-Leaf Plot Playground

Jeroen Janssens
Apr 23, 2023 • 5 min read

Inspired by Julia Evans’ post A list of programming playgrounds, I decided to revive a playground I made about 10 years ago.

Back in the old days, when many data sets were still small, stem-and-leaf plots were a common method of representing quantitative data. John Tukey’s Exploratory Data Analysis, which popularized stem-and-leaf plots, has a nice example on the cover.

EDA’s cover contains a stem-and-leaf plot. Click to enlarge.
EDA’s cover contains a stem-and-leaf plot. Click to enlarge.

Playground

In 2013 I needed an excuse to try out D3 and CoffeeScript, so I made an interactive playground for stem-and-leaf plots. The original CoffeeScript code and transpiled JavaScript are available on GitHub.

The plot updates as you change the values in the textarea. Try adding negative values, very large values, or even fractions. If you hover over the leaves you see the original values. The example data comes from EDA’s cover.


Would you like to receive an email whenever I have a new blog post, organize an event, or have an important announcement to make? Sign up to my newsletter:
© 2013–2024  Jeroen Janssens