image.kriging {geoR} | R Documentation |
Plots image or perspective plots with results of the kriging calculations.
image(x, locations, borders, values = x$predict, coords.data, xlim, ylim, x.leg, y.leg, ...) persp.kriging(x, locations, borders, values = obj$predict, ...)
x |
an object of the class kriging , typically
with the output of the functions krige.conv or ksline . |
locations |
an n x 2 matrix with the
coordinates of the prediction locations, which should define a
regular grid
in order to be plotted by image or
persp . By default does not need to be provided and
evaluates the attribute "prediction.locations" from the input object. |
borders |
an n x 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 's to the external ones.
|
values |
a vector with values to be plotted. Defaults to obj$predict . |
coords.data |
optional. If an n x 2 matrix with the data coordinates is provided, points indicating the data locations are included in the plot. |
xlim, ylim |
|
x.leg, y.leg |
limits for the legend in the horizontal and vertical directions. |
... |
further arguments to be passed to the functions
image , persp or
legend.krige .
For instance, the
argument zlim can be used to set the the minimum and maximum
`z' values for which colors should be plotted.
See documentation for those function for
possible arguments.
|
An image or perspective plot is produced o the current graphics device. No values are returned.
Paulo J. Ribeiro Jr. Paulo.Ribeiro@est.ufpr.br,
Peter J. Diggle p.diggle@lancaster.ac.uk.
Further information on the package geoR can be found at:
http://www.est.ufpr.br/geoR.
krige.conv
and ksline
for kriging
calculations. Documentation for
image
and persp
contain basic information
on the plotting functions.
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))) op <- par(no.readonly = TRUE) par(mfrow=c(1,2), mar=c(3,3,0,0), mgp=c(1.5, .8,0)) image(kc, loc=loci) image(kc, loc=loci, val=kc$krige.var) # notice different ways to add the legends and pass arguments: image(kc, loc=loci, ylim=c(-0.2, 1), x.leg=c(0,1), y.leg=c(-0.2, -0.1)) image(kc, loc=loci, val=kc$krige.var, ylim=c(-0.2, 1)) legend.krige(y.leg=c(-0.2,-0.1), x.leg=c(0,1), val=kc$krige.var) image(kc, loc=loci, ylim=c(-0.2, 1), x.leg=c(0,1), y.leg=c(-0.2, -0.1), cex=1.5) image(kc, loc=loci, ylim=c(-0.2, 1), x.leg=c(0,1), y.leg=c(-0.2, -0.1), off=0.5) image(kc, loc=loci, xlim=c(0, 1.2)) legend.krige(x.leg=c(1.05,1.1), y.leg=c(0,1),kc$pred, vert=TRUE) image(kc, loc=loci, xlim=c(0, 1.2)) legend.krige(x.leg=c(1.05,1.1), y.leg=c(0,1),kc$pred, vert=TRUE, off=1.5, cex=1.5) par(op)