plot.geardf: Plot 'geardf' object

Description Usage Arguments Author(s) See Also Examples

View source: R/geardf-plot.R

Description

Plot a geardf object produced by the geardf or predict.geolm* functions. See the autopoints and autoimage functions for advanced options.

Usage

1
2
## S3 method for class 'geardf'
plot(x, zcol = names(x), interp = FALSE, common.legend = FALSE, ...)

Arguments

x

A geardf object produced by the geardf or predict.geolm* functions.

zcol

The names of the columns of x to plot. The coordinate columns are automatically stripped from zcol.

interp

A logical value indicating whether the values should be interpolated onto a grid. If FALSE, then the autopoints function is used to construct a heated scatterplot. If TRUE, then the autoimage function is used to create a heat map. The default is FALSE.

common.legend

A logical value indicating whether a common legend should be used for the scatterplots/images. The default is FALSE.

...

Additional arguments to passed to the autopoints or autoimage functions.

Author(s)

Joshua French

See Also

autopoints, autoimage

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
data(toydata)
# newdata must have columns with prediction coordinates
newdata = data.frame(x1 = runif(10), x2 = runif(10))

# specify a standard covariance model
mod = cmod_std(model = "exponential", psill = 1, r = 1)

# geolm for universal kriging
geolm_uk = geolm(y ~ x1 + x2, data = toydata, mod = mod,
             coordnames = c("x1", "x2"))

# prediction for universal kriging
pred_uk = predict(geolm_uk, newdata, return_type = "geardf")
# heated scatterplot
plot(pred_uk)
# interpolated image of results
plot(pred_uk, interp = TRUE)
# plot only predictions and rmspe with different colors
plot(pred_uk, c("pred", "rmspe"), col = cm.colors(5))
#'plot only predictions with coarser interpolation grid
plot(pred_uk, "pred", interp = TRUE,
     interp.args = list(no.X = 10, no.Y = 10))

gear documentation built on April 14, 2020, 5:12 p.m.

Related to plot.geardf in gear...