Prints boxplots for one or more samples.
NI Vector of
length NGROUP.
(Input)
NI(I) is the number of
observations in the I-th group.
X Vector of
length NI(1) +
NI(2) +
+
NI(NGROUP).
(Input)
The first NI(1) positions
contain the observations for the first group. The next NI(2) positions
contain the observations for the second group, and so on.
TITLE CHARACTER string containing the title of the plot. (Input)
NGROUP The
total number of groups of samples. (Input)
Default: NGROUP = size (NI,1).
Generic: CALL BOXP (NI, X, TITLE [, ])
Specific: The specific interface names are S_BOXP and D_BOXP.
Single: CALL BOXP (NGROUP, NI, X, TITLE)
Double: The double precision name is DBOXP.
BOXP prints NGROUP boxplots. The minimum and maximum of X are printed. The median of each data group is marked by * and the upper and lower hinges by I. The H-spread is the distance between the upper and lower hinges. The observation farthest from the median that still remains within one step (1.5 H-spread) from each hinge also is marked by +. The values in the second step (between 1.5 and 3 H-spreads from the hinges) are marked by the letter O and the values beyond the second step are marked by X. If there are fewer than five data points, each data point is plotted with an X. If multiple data points occur at positions marked X or O, the number of multiple points is noted. More information on boxplots can be found in Chapter 2 of Chambers et al. (1983).
1. Workspace may be explicitly provided, if desired, by use of B2XP/DB2XP. The reference is:
CALL B2XP (NGROUP, NI, X, TITLE, WKSP)
The additional argument is:
WKSP Workspace of length NI(1) +
+ NI(NGROUP). (Input)
The first
NI(1)
positions contain the sorted data from the first NI(1) positions of X. The next NI(2) positions
contain sorted data from the next NI(2) positions of X, and so on.
2. Informational error
Type Code
3 5 TITLE is too long to fit into the page width determined by the routine PGOPT. TITLE is truncated from the right side.
3. TITLE is centered and placed at the top of the plot. The plot starts on a new page and the default page width is 78. The user may change the width by calling the routine PGOPT (see Chapter 19, Utilities;) in advance.
This example prints boxplots of three batches of data containing 5, 16 and 7 observations, respectively.
USE PGOPT_INT
USE BOXP_INT
IMPLICIT NONE
INTEGER IPAGE, NGROUP, I
PARAMETER (NGROUP=3)
!
INTEGER NI(NGROUP)
REAL X(28)
!
DATA (NI(I),I=1,3)/5, 16, 7/
DATA (X(I),I=1,5)/7., 9., 3., 1., 1./
DATA (X(I),I=6,21)/25., 0., 1., 0., 5., 4., 3., 5., 5., 5., 5., &
5., 5., 25., 15., 9./
DATA (X(I),I=22,28)/10., 15., 20., 25., 2., 9., 12./
! Set page width.
IPAGE = 70
CALL PGOPT (-1, IPAGE)
CALL BOXP (NI, X, 'Plot of BOXP')
!
END
Plot of BOXP
X
X X
X
2
I--------I
+--------I * I-----+ O X
I--------I 2
I--------------------I
+-------------------I * I-------------------+
I--------------------I
+................................+.................................+
0.0 12.5 25.0
PHONE: 713.784.3131 FAX:713.781.9260 |