Prints a stem-and-leaf plot.
X Array of length NOBS containing the data. (Input)
UNITS Size of
the increment on the stem. (Input)
If UNITS is set so small
that the length of the stem is more than 60 lines, STMLP will use a UNITS such that the
stem will be no longer than 60 lines. However, if UNITS is a negative
integer, STMLP
will use the absolute value of UNITS, even if the
stem would become very long. A common value for UNITS is 10.
TITLE CHARACTER string containing the plot title. (Input)
NOBS Number of
observations. (Input)
Default: NOB = size (X,1).
Generic: CALL STMLP (X, UNITS, TITLE [, ])
Specific: The specific interface names are S_STMLP and D_STMLP.
Single: CALL STMLP (NOBS, X, UNITS, TITLE)
Double: The double precision name is DSTMLP.
Routine STMLP prints a stem-and-leaf display. The user can specify that the plot be longer than one page, but the default maximum is 60 lines. A plus sign (+) at the end of a line indicates that there are too many data points to fit within the width specifications. A scale marked in units of 10 is printed below the stemand-leaf display.
1. Workspace may be explicitly provided, if desired, by use of S2MLP/DS2MLP. The reference is:
CALL S2MLP (NOBS, X, UNITS, TITLE, MAXWID, IWK, WK)
The additional arguments are as follows:
MAXWID Page width.
(Input)
MAXWID = 78 when STMLP is
called.
IWK Work vector of length MAXWID.
WK
Vector of length NOBS. (Output)
WK contains the
sorted data from X.
2. Informational error
Type Code
3 4 TITLE is too long to fit into the page width determined by the routine PGOPT. TITLE is truncated from the right side.
3. Default page width is 78. The user may change it by calling the routine PGOPT (see Chapter 19, Utilities) in advance.
This example prints a stem-and-leaf plot consisting of 27 data points ranging from −21.8 to 106.5.
USE STMLP_INT
IMPLICIT NONE
INTEGER NOBS
PARAMETER (NOBS=27)
!
REAL UNITS, X(NOBS)
!
DATA X/6.0, 106.5, 34.0, 88.1, 89.0, 0.3, 0.7, 4.0, 4.0, 5.0, &
56.0, 62.8, 99.0, 4.0, 15.0, 76.0, 7.6, 101.5, 33.0, 91.0, &
91.0, -6.3, -21.8, 0.0, 8.99, 5.5, 6.9/
!
UNITS = 10.
CALL STMLP (X, UNITS, 'Stem and leaf plot')
!
END
Stem and leaf plot
Each line on the stem represents 1.0 unit(s).
For example: 1 25
2 2
represents the data 12., 15., and 22.
-2.2
-1
-0 6
0 001444566789
1 5
2
3 34
4
5 6
6 3
7 6
8 89
9 119
10 27
PHONE: 713.784.3131 FAX:713.781.9260 |