variogramModelPlot.gstatVariogram {gmGeostats} | R Documentation |
Quick plotting of empirical and theoretical variograms Quick and dirty plotting of empirical variograms/covariances with or without their models
Description
Quick plotting of empirical and theoretical variograms Quick and dirty plotting of empirical variograms/covariances with or without their models
Usage
## S3 method for class 'gstatVariogram'
variogramModelPlot(
vg,
model = NULL,
col = rev(rainbow(1 + length(unique(vg$dir.hor)))),
commonAxis = FALSE,
newfig = TRUE,
closeplot = TRUE,
...
)
Arguments
vg |
empirical variogram or covariance function |
model |
optional, theoretical variogram or covariance function |
col |
colors to use for the several directional variograms |
commonAxis |
boolean, should all plots in a row share the same vertical axis? |
newfig |
boolean, should a new figure be created? otherwise user should ensure the device space is appropriately managed |
closeplot |
logical, should the plot be left open (FALSE) for further changes, or be frozen (TRUE)? defaults to TRUE |
... |
further parameters to underlying plot or matplot functions |
Value
The function is primarily called for producing a plot. However, it
invisibly returns the graphical parameters active before the call
occurred. This is useful for constructing complex diagrams, by giving
argument closeplot=FALSE
and then adding layers
of information. If you want to "freeze" your plot, either give closeplot=TRUE
or
embed your call in another call to par
, e.g. par(variogramModelPlot(...))
.
See Also
gstat::plot.gstatVariogram()
Other variogramModelPlot:
variogramModelPlot.logratioVariogram()
,
variogramModelPlot()
Examples
data("jura", package="gstat")
X = jura.pred[,1:2]
Zc = jura.pred[,7:13]
gg = make.gmCompositionalGaussianSpatialModel(Zc, X, V="alr", formula = ~1)
vg = variogram(gg)
md = gstat::vgm(model="Sph", psill=1, nugget=1, range=1.5)
gg = fit_lmc(v=vg, g=gg, model=md)
variogramModelPlot(vg, model=gg)