Usage
gx.hist(xx, xlab = deparse(substitute(xx)),
ylab = "Number of Observations", log = FALSE, xlim = NULL,
main = "", nclass = "Scott", colr = 8, ifnright = TRUE,
cex = 1, ...)
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>
ylab
a default y-axis title of "Number of Observations"
is provided, this may be changed, e.g., ylab = "Counts"
.
log
if it is required to display the data with logarithmic (x-axis) scaling, set log = TRUE
.
xlim
default limits of the x-axis are determined in the function for use in other panel plots of function shape
. However when used stand-alone the limits may be user-defined by setting xlim
, see Note below.
main
when used stand-alone a title may be added optionally above the plot by setting main
, e.g., main = "Kola Project, 1995"
.
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
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 for data set 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 titles may be changed by setting cex.lab
, the size of the axis labels by setting cex.axis
, and the size of the plot title by setting cex.main