Usage
bwplot(x, by, log = FALSE, wend = 0.05, notch = TRUE, xlab = "",
ylab = deparse(substitute(x)), ylim = NULL, main = "",
label = NULL, plot.order = NULL, xpos = NA, width,
space = 0.25, las = 1, cex.axis = 1, adj = 0.5, add = FALSE,
ssll = 1, colr = 8, pch = 3, ...)
Arguments
x
name of the variable to be plotted.
by
the name of the factor variable to be used to subdivide the data. See Details below for when by
is undefined.
log
if it is required to display the data with logarithmic (y-axis) scaling, set log = TRUE
.
wend
the locations of the whisker-ends have to be defined. By default these are at the 5th and 95th percentiles of the data. Setting wend = 0.02
plots the whisker ends at the 2nd and 98th percentiles.
notch
determines if the boxplots are to be notched such that the notches indicate the 95% confidence intervals for the medians. The default is to notch the boxplots, to suppress the notches set notch = FALSE
. See Details below.
xlab
a title for the x-axis, by default none is provided.
ylab
a title for the y-axis. It is often desirable to replace the default y-axis title of the input variable name text string with a more informative title, e.g., ylab = "Cu (mg/kg) in <2 mm="" c-horizon="" soil"<="" code="">.2>
ylim
defines the limits of the y-axis if the default limits based on the range of the data are unsatisfactory. It can be used to ensure the y-axis scaling in multiple sets of boxplots are the same to facilitate visual comparison.
main
a main title may be added optionally above the display by setting main
, e.g., main = "Kola Project, 1995"
.
label
provides an alternate set of labels for the boxplots along the x-axis. By default the character strings defining the factors are used. Thus, label = c("Alt1", "Alt2", "Alt3")
.
plot.order
provides an alternate order for the boxplots. Thus, plot.order = c(2, 1, 3)
will plot the 2nd ordered factor in the 1st position, the 1st in the 2nd, and the 3rd in its 3rd ordered postion, see Details and Examples below.
xpos
the locations along the x-axis for the individual vertical boxplots to be plotted. By default this is set to NA
, which causes default equally spaced positions to be used, i.e. boxplot 1 plots at value 1 on the x-axis, boxplot 2 at value 2, e
width
the width of the boxes, by default this is set to the minimum distance between all adjacent boxplots times the value of space
. With the default values of xpos
this results in a minimum difference of 1
, and with the
space
the space between the individual boxplots, by default this is 0.25 x-axis units.
las
controls whether the x-axis labels are written parallel to the x-axis, the default las = 1
, or are written down from the x-axis by setting las = 2
. See also, Details below.
cex.axis
controls the size of the font used for the factor labels plotted along the x-axis. By default this is 1
, however, if the labels are long it is sometimes necessary to use a smaller font, for example cex.axis = 0.8
results in a fo
adj
controls the justification of the x-axis labels. By default they are centred, adj = 0.5
, to left justify them if the labels are written downwards set adj = 0
.
add
permits the user to plot additional boxplots into an existing display. It is recommended that this option is left as add = FALSE
.
ssll
determines the minimum data subset size for which a subset will be plotted. By default this is set to 1
, which leads to only a plus sign being plotted, as the subset size increases additional features of the boxplot are displayed. If
colr
by default the boxes are infilled in grey, colr = 8
. If no infill is required, set colr = 0
. See display.lty
for the range of available colours. pch
by default the plotting symbol for the subset maxima and minima are set to a plus, pch =
3, alternate plotting symbols may be chosen from those displayed by display.marks
. ...
further arguments to be passed to methods. For example, the size of the axis titles by setting cex.lab
, and the size of the plot title by setting cex.main
. For example, if it is required to make the plot title smaller, add