cnpplt {rgr}R Documentation

Cumulative Normal Percentage Probability (CPP) Plot

Description

Displays a cumulative normal percentage probability (CPP) plot, equivalent to a Q-Q plot, as has been traditionally used by physical scientists and engineers.

Usage

cnpplt(xx, xlab = deparse(substitute(xx)), 
        ylab = "% Cumulative Probability", log = FALSE, xlim = NULL, 
        main = " ", pch = 3, cex.axis = 1, ifqs = FALSE, ifshape = FALSE)

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 text string with a more informative title, e.g., xlab ="Cu (mg/kg) in <2 mm O-horizon soil".
ylab a title for the y-axis, defaults to "% Cumulative Probability".
log if it is required to display the data with logarithmic (x-axis) scaling, set log = TRUE.
xlim when used in the shape function, xlim is determined by function gx.hist and used to ensure all four panels in shape have the same x-axis scaling. 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".
pch by default the plotting symbol is set to a plus, pch = 3, alternate plotting symbols may be chosen from those displayed by display.marks.
cex.axis if overplotting occurs in the y-axis labelling the size of the y-axis labels may be reduced by setting cex.axis to a number smaller than 1, e.g., 0.8.
ifqs setting ifqs = TRUE results in horizontal and vertical dotted lines being plotted at the three central quartiles and their values, respectively.
ifshape when used with function shape or caplot to plot into a panel set ifshape = TRUE to ensure only essential probability scale axis labels are displayed to avoid overplotting on the reduced size panel plot.

Note

Any less than detection limit values represented by negative values, or zeros or other numeric codes representing blanks in the data vector, must be removed prior to executing this function, see ltdl.fix.df.

Any NAs in the data vector are removed prior to displaying the plot.

If the default selection for xlim is inappropriate it can be set, e.g., xlim = c(0, 200) or c(2, 200). If the defined limits lie within the observed data range a truncated plot will be displayed. If this occurs the number of data points omitted is displayed below the total number of observations.

If it is desired to prepare a display of data falling within a defined part of the actual data range, then either a data subset can be prepared externally using the appropriate R syntax, or xx may be defined in the function call as, for example, Cu[Cu < some.value] which would remove the influence of one or more outliers having values greater than some.value. In this case the number of data values displayed will be the number that are <some.value.

Author(s)

Robert G. Garrett

See Also

display.marks, ltdl.fix.df, remove.na

Examples

## Make test data available
data(kola.o)
attach(kola.o)

## A stand-alone cumulative normal percentage probability plot
cnpplt(Cu)

## A more appropriately labelled and scaled cumulative normal percentage
## probability plot using a cross/x rather than a plus
cnpplt(Cu, xlab = "Cu (mg/kg) in <2 mm O-horizon soil", log = TRUE, 
        pch = 4)

## Detach test data
detach(kola.o)

[Package rgr version 1.0.3 Index]