pkern_plot_pars: Plot the covariance structure of a pkern model

View source: R/pkern_plot.R

pkern_plot_parsR Documentation

Plot the covariance structure of a pkern model

Description

Visualization of the footprint of a covariance kernel as a heatmap of size g$gdim, where each grid cell is colored according to its covariance with the central grid point.

Usage

pkern_plot_pars(pars, g, simple = FALSE, ...)

Arguments

pars

list of the form returned by pkern_pars with entries 'y', 'x', ('eps', 'psill')

g

any object understood by pkern_grid

...

additional arguments passed to pkern_plot

Details

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 pkern_plot apart from gdim).

Value

the same as pkern_plot

Examples

gdim = c(100, 100)
pars = pkern_pars(gdim, 'mat')
pkern_plot_pars(pars, gdim)

# zoom in/out by passing a grid object with suitably modified resolution
g = pkern_grid(gdim)
pkern_plot_pars(pars, g)
pkern_plot_pars(pars, modifyList(g, list(gres=2*g$gres)))
pkern_plot_pars(pars, modifyList(g, list(gres=0.2*g$gres)))

# change other plot style settings
pkern_plot_pars(pars, modifyList(g, list(gres=0.5*g$gres)), simple=TRUE)
pkern_plot_pars(pars, modifyList(g, list(gres=0.5*g$gres)), minimal=TRUE, col_invert=TRUE)


deankoch/pkern documentation built on Oct. 26, 2023, 8:54 p.m.