View source: R/plot.autoKrige.r
plot.autoKrige | R Documentation |
Defines methods to plot objects in automap.
## S3 method for class 'autoKrige'
plot(x, sp.layout = NULL, ...)
## S3 method for class 'posPredictionInterval'
plot(x, sp.layout = NULL, justPosition = TRUE, main = "Position prediction interval", ...)
x |
the object to plot (of class |
sp.layout |
An object that can contain lines, points and polygons that function as extra layout. |
justPosition |
logical, if FALSE: not only the plot with the position of the prediction interval is plotted, but also plots with the upper and lower limits of the prediction interval. |
main |
Title of the plot for the position of the prediction interval. |
... |
arguments passed to lattice functions xyplot, spplot or plot.sf |
For a detailed description of how sp.layout
is constructed see spplot.
Paul Hiemstra, paul@numbertheory.nl
spplot
, autoKrige
, posPredictionInterval
# Ordinary kriging
library(sp)
library(sf)
data(meuse)
coordinates(meuse) =~ x+y
data(meuse.grid)
gridded(meuse.grid) =~ x+y
kriging_result = autoKrige(log(zinc)~1, meuse, meuse.grid)
# Adding the sp.layout parameter shows the locations of the measurements
plot(kriging_result, sp.layout = list(pts = list("sp.points", meuse)))
meuse = as(meuse, "sf")
meuse.grid = as(meuse.grid, "sf")
kriging_result = autoKrige(log(zinc)~1, meuse, meuse.grid)
# Adding the meuse points shows the locations of the measurements
plot(kriging_result, points = meuse)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.