Speaking Stata: Turning over a new leaf

Stem-and-leaf displays have been widely taught since John W. Tukey publicized them energetically in the 1970s. They remain useful for many distributions of small or modest size, especially for showing fine structure such as digit preference. Stata’s implementation stem produces typed text displays and has some inevitable limitations, especially for comparison of two or more displays. One can re-create stem-and-leaf displays with a few basic Stata commands as scatterplots of stem variable versus position on line with leaves shown as marker labels. Comparison of displays then becomes easy and natural using scatter, by(). Back-to-back presentation of paired displays is also possible. I discuss variants on standard stem-and-leaf displays in which each distinct value is a stem, each distinct value is its own leaf, or axes are swapped. The problem shows how one can, with a few lines of Stata, often produce standard graph forms from first principles, allowing in turn new variants. I also present a new program, stemplot, as a convenience tool.

Issue Date:
Publication Type:
Journal Article
DOI and Other Identifiers:
gr0028 (Other)
PURL Identifier:
Published in:
Stata Journal, Volume 07, Number 3
Page range:
Total Pages:

Record appears in:

 Record created 2017-04-01, last modified 2017-08-16

Download fulltext

Rate this document:

Rate this document:
(Not yet reviewed)