Learn R Programming

geoR (version 1.2-5)

image.kriging: Image or Perspective Plot with Kriging Results

Description

Plots image or perspective plots with results of the kriging calculations.

Usage

## S3 method for class 'kriging':
image(x, locations, borders, values = obj$predict,
              coords.data, x.leg, y.leg, cex.leg = 0.75,
              vertical = FALSE, ...)

persp.kriging(x, locations, borders, values = obj$predict, ...)

Arguments

x
an object of the class kriging, typically with the output of the functions krige.conv or ksline.
locations
an $n \times 2$ matrix with the coordinates of the prediction locations, which should define a regular grid in order to be plotted by image or persp
borders
an $n \times 2$ matrix with the coordinates defining the borders of a region inside the grid defined by locations. Elements in the argument values are assigned to locations internal to the borders and NA
values
a vector with values to be plotted. Defaults to obj$predict.
coords.data
optional. If an $n \times 2$ matrix with the data coordinates is provided, points indicating the data locations are included in the plot.
x.leg
limits for the legend in the $x$ direction.
y.leg
limits for the legend in the $y$ direction.
cex.leg
controls the size of the numerical values in the legend.
vertical
logical, defining whether the legend is drawn in horizontal (default) or vertical position.
...
further arguments to be passed to the functions image or persp.

Value

  • An image or perspective plot is produced o the current graphics device. No values are returned.

References

Further information about geoR can be found at: http://www.maths.lancs.ac.uk/~ribeiro/geoR.

See Also

krige.conv and ksline for kriging calculations. Documentation for image and persp contain basic information on the plotting functions.

Examples

Run this code
if(is.R()) data(s100) 
loci <- expand.grid(seq(0,1,l=31), seq(0,1,l=31))
kc <- krige.conv(s100, loc=loci,
                 krige=krige.control(cov.pars=c(1, .25)))
par(mfrow=c(1,2))
image.kriging(kc, loc=loci)
image.kriging(kc, loc=loci, val=kc$krige.var)

Run the code above in your browser using DataLab