Learn R Programming

stppResid (version 1.1)

plot.gridresid: Plot grid-based residuals

Description

plot.gridresid is a generic function for plotting grid-based residuals.

Usage

"plot"(x, ..., col.key = rev(heat.colors(100)), cutoffs = NULL)

Arguments

x
A “gridresid” object.
...
Arguments for use with points.
col.key
A vector of colors in hexadecimal format.
cutoffs
A vector of cut points for assigning the colors in col.key to the residuals in X. cutoffs should be a vector of length one more than the length of col.key.

Details

cutoffs must be a vector of increasing values of the same length as col.key plus 1. cutoffs divides the residual values in x$residuals into a number of intervals equal to the number of colors in col.key. The colors are assigned to the intervals in order, e.g. the first color in col.key will be plotted in the bins defined by the spatial grid in x$grid that contains a residual that falls anywhere in the first interval (lower bound inclusive, upper bound exclusive). Default col.key is a vector of 100 heat colors in reverse. Default cutoffs is a vector of 101 equally spaced points that range from the minimum residual in x$residuals, minus a very small number, to the maximum residual, plus a very small number.

See Also

gridresid, image

Examples

Run this code
data(gresiduals)
plot(gresiduals)

hist(gresiduals$residuals)
cutoffs = c(seq(-2.74, -1.01, length.out = 15), 
seq(-1, 1, length.out = 70), seq(1, 3.83, length.out = 16))
plot(gresiduals, cutoffs = cutoffs)

Run the code above in your browser using DataLab