Stem and Leaf Display - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Stem-and-Leaf Display

Main Concept

The stem-and-leaf display assists in visualizing the overall shape of a distribution of data. Similar to histograms, these plots are useful for displaying an overview of the relative density of the data and can be efficient for highlighting outlying values and finding the mode of the sample. Stem-and-leaf displays are generally only useful for smaller data samples as they tend to appear cluttered and unreadable starting at around 150 observations or more. After this number of observations, other plots such as histograms or box plots may be more useful in giving an overview of the shape of the distribution.

 

The stem-and-leaf display is visually separated into two columns separated by a vertical line. The stems are listed to the left of the line and each stem is only listed once. The leaves are listed in increasing order on the right of the line with any repeated values included.

 

Stem-and-leaf display code

A procedure for generating stem-and-leaf displays is included in the following code edit region. You can copy this code and use it to make your own plots.

 

X  1,44, 46, 47, 49, 63, 64, 66, 68, 68, 72, 72, 75, 76, 81, 84, 88, 106,16:

StemPlotX;

-1      |  6

-0      |  
0       |  1
1       |  
2       |  
3       |  
4       |  4 6 7 9
5       |  
6       |  3 4 6 8 8
7       |  2 2 5 6
8       |  1 4 8
9       |  
10      |  6

Y  convertLinearAlgebra:-RandomVector100, list:

StemPlotY;

-9      |  9 8 7

-8      |  5 4 2 0
-7      |  8 8 7 7 4 3 0
-6      |  8 6 6 5 1 0 0
-5      |  3 1 0
-4      |  9 9 8 8 6 6 6 4 2 2 0
-3      |  9 4 4 2
-2      |  9 8 1 0
-1      |  7 5 4 4 3 2
-0      |  8 8
0       |  0 1 1 2 7 7 8 9
1       |  0 1 4 5 6 8
2       |  0
3       |  0 0 2 2 3 4 5 6 7 7
4       |  5
5       |  1 2 3 4 7 7 8
6       |  2 3 5
7       |  0 0 1
8       |  1 3 3 4 8 9
9       |  1 6 9 9

 

 

 

Choose numbers between 1 and

Stem-and-leaf Display

 

 

More MathApps

MathApps/ProbabilityAndStatistics