sk_plot_pars {snapKrig} | R Documentation |
Plot the covariance structure of a snapKrig model
Description
Visualization of the footprint of a covariance kernel as a heatmap of approximate
size dim(g)
, where each grid cell is colored according to its covariance with
the central grid point.
Usage
sk_plot_pars(pars, g = NULL, simple = FALSE, ...)
Arguments
pars |
list of the form returned by |
g |
any object understood by |
simple |
logical, if FALSE the function adds some annotation |
... |
additional arguments passed to |
Details
If g
is not supplied, the function sets a default with dimensions 100 x 100.
A default resolution is computed such that the maximum nugget-free covariance along
the outer edge of the plot is 5% of pars$psill
.
When simple=FALSE
(the default), covariance parameters are printed in the
title and axis labels with values rounded to 3 decimal places. This can be
customized by passing arguments 'main', 'ylab', 'xlab' (and any others
accepted sk_plot
apart from gdim
).
Value
the same as sk_plot
See Also
sk sk_pars
Other plotting functions:
sk_plot()
Examples
gdim = c(100, 100)
g = sk(gdim)
pars = sk_pars(g, 'mat')
# plot with default grid
sk_plot_pars(pars)
# plot with a predefined grid
sk_plot_pars(pars, g)
# zoom in/out by passing a grid object with suitably modified resolution
gres = g[['gres']]
sk_plot_pars(pars, sk(gdim=gdim, gres=0.5*gres))
sk_plot_pars(pars, sk(gdim=gdim, gres=2*gres))
# change plot style settings (all parameters of sk_plot accepted)
sk_plot_pars(pars, simple=TRUE)
sk_plot_pars(pars, minimal=TRUE)