Calcite | Level 5

## stem-and-leaf Plot

Dose SAS have any proc to produce data for stem-and-leaf plot. Or how can I draw stem-and-leaf plot for this data:

124, 129, 118, 135, 114, 139, 127, 141, 111, 144, 133, 127,
122, 119, 132, 137, 146, 122, 119, 115, 125, 132, 118, 126,
134, 147, 122, 119, 116, 125, 128, 130, 127, 135, 122, 141

Thanks

5 REPLIES 5
Super User

## Re: stem-and-leaf Plot

Yes. Check PROC UNIVARIATE .

``````PLOTS | PLOT
produces a stem-and-leaf plot (or a horizontal bar chart), a box plot, and a normal probability
plot in line printer output. If you use a BY statement, side-by-side box plots that are labeled
“Schematic Plots” appear after the univariate analysis for the last BY group.
``````
Calcite | Level 5

## Re: stem-and-leaf Plot

Works. Thanks. 🙂

Calcite | Level 5

## Re: stem-and-leaf Plot

how to make normal probability plot in other line printer output

`` ``

Super User

## Re: stem-and-leaf Plot

Please start a brand new session, this post is two years old.

And better post it at ODS Graph forum, if you want plot a scatter/series graph.

Super User

## Re: stem-and-leaf Plot

Example 4.5: Creating Plots for Line Printer Output
The PLOT option in the PROC UNIVARIATE statement requests several basic plots for display in
“Creating Line Printer Plots” on page 338. This example illustrates the use of the PLOT option as
well as BY processing in PROC UNIVARIATE.
A researcher is analyzing a data set consisting of air pollution data from three different measurement
sites. The data set AirPoll, created by the following statements, contains the variablesSite andOzone,
which are the site number and ozone level, respectively.
data AirPoll (keep = Site Ozone);
label Site = 'Site Number'
Ozone = 'Ozone level (in ppb)';
do i = 1 to 3;
input Site @@;
do j = 1 to 15;
input Ozone @@;
output;
end;
end;
datalines;
102 4 6 3 4 7 8 2 3 4 1 3 8 9 5 6
134 5 3 6 2 1 2 4 3 2 4 6 4 6 3 1
137 8 9 7 8 6 7 6 7 9 8 9 8 7 8 5
;
run;
The following statements produce stem-and-leaf plots, box plots, and normal probability plots for
each site in the AirPoll data set:
ods select Plots SSPlots;
proc univariate data=AirPoll plot;
by Site;
var Ozone;
run;

Discussion stats
• 5 replies
• 4645 views
• 0 likes
• 3 in conversation