Library: | plot |
See also: | plotbox plotdotcl plothistcl dispboxcl grboxcl |
Quantlet: | plotboxcl | |
Description: | high level routine for boxplots of classified data. |
Usage: | plotboxcl(gr, fr{, inLabels}) | |
Input: | ||
gr | m x n grid matrix, each column must be ordered ascendently | |
fr | (m-1) x n matrix of frequencies for each interval in each column | |
inLabels | n x 1 vector of labels for each column |
2) Generates a boxplot with median line and upper and lower edge of the box being the upper and lower quartile. The whiskers designate the farest non-outliers above resp. below the box. Outliers are all data at least 1.5 * (height of box) away from the upper resp. lower edge of the box. Outliers are plotted as circles. If this distance exceeds 3 * (height of box), a star symbol is used ("gross outlier") Requires the library "stats" to be present.
library("plot") library("stats") randomize(666) ; make four columns each with 15 random intervals gr = sort(normal(5,4)|5+normal(5,4)|10+normal(5,4),0) gr[,3] = 10 + gr[,3] fr = ceil(30*uniform(14)~20*uniform(14,2)~2*uniform(14)) ; you can use sum(fr) in order to see if the labels are all right labels = "252 obs."|"132 obs."|"140 obs."|"22 obs." plotboxcl(gr,fr, labels)
Four boxplots with labels in one display are shown.