Usage
shape(xx, xlab = deparse(substitute(xx)), log = FALSE,
xlim = NULL, nclass = "Scott", ifbw = FALSE, wend = 0.05,
ifnright = TRUE, colr = 8, cex = 0.8, ...)
Arguments
xx
name of the variable to be plotted.
xlab
a title for the x-axis. It is often desirable to replace the default x-axis title of the input variable name text string with a more informative title, e.g., xlab = "Cu (mg/kg) in <2 mm="" o-horizon="" soil"<="" code="">.2>
log
if it is required to display the data with logarithmic (x-axis) scaling, set log = TRUE
.
xlim
is determined by gx.hist
and used to ensure all four panels in this function have the same x-axis scaling. xlim
may be defined, see Note below. nclass
the default procedure for preparing the histogram is to use the Scott (1979) rule. This usually provides an informative histogram, other optional rules are nclass = "sturges"
or nclass = "fd"
; the later standing for Freedman-Diac
ifbw
the default is to plot a horizontal Tukey boxplot, if a box-and-whisker plot is required set ifbw = TRUE
.
wend
if ifbw = TRUE
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.
colr
by default the histogram is infilled in grey, colr = 8
. If no infill is required, set colr = 0
. See function display.lty
for the range of available colours. ifnright
controls where the sample size is plotted in the histogram display, by default this in the upper right corner of the plot. If the data distribution is such that the upper left corner would be preferable, set ifnright = FALSE
.
cex
by default the size of the text sample size, N, is set to 80%, i.e. cex = 0.8
, and may be changed if required.
...
further arguments to be passed to methods. For example, the size of the axis scale annotation can be changed by setting cex.axis
, the size of the axis titles by setting cex.lab
, and the size of the plot title by setting ce