automapPlot | R Documentation |
This function wraps around spplot and creates a blue-to-whitish colorscale instead of the standard bpy colorscale.
automapPlot(plot_data, zcol, col.regions, sp.layout, points, ...)
plot_data |
A spatial object that is to be plotted, sp or sf |
zcol |
The name of the column from |
col.regions |
Choose a colors that specify the fill colours. |
sp.layout |
An sp.layout object that can be passed to spplot, to be added to the plot |
points |
Points that can be added to the plot |
... |
other possible arguments that can be passed on to spplot. |
The classIntervals
function from the classInt
package is
a good function to calculate the position of the colorbreaks.
Paul Hiemstra, paul@numbertheory.nl
spplot
, plot.autoKrige
, plot.posPredictionInterval
# Ordinary kriging
library(sp)
data(meuse)
coordinates(meuse) =~ x+y
data(meuse.grid)
gridded(meuse.grid) =~ x+y
kriging_result = autoKrige(zinc~1, meuse, meuse.grid)
# Adding the sp.layout parameter shows the locations of the measurements
automapPlot(kriging_result$krige_output, "var1.pred",
sp.layout = list("sp.points", meuse))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.