plot.gmEVario: Plot empirical variograms

View source: R/variograms.R

plot.gmEVarioR Documentation

Plot empirical variograms

Description

Flexible plot of an empirical variogram of class gmEVario

Usage

## S3 method for class 'gmEVario'
plot(
  x,
  xlim.up = NULL,
  xlim.lo = NULL,
  vdir.up = NULL,
  vdir.lo = NULL,
  varnames = dimnames(x$gamma)[[2]],
  type = "o",
  add = FALSE,
  commonAxis = TRUE,
  cov = attr(x, "type") == "covariance",
  closeplot = TRUE,
  ...
)

Arguments

x

object to print, of class gmEVario

xlim.up

range of X values to be used for the diagrams of the upper triangle

xlim.lo

range of X values to be used for the diagrams of the lower triangle

vdir.up

in case of anisotropic variograms, indices of the directions to be plotted on the upper triangle

vdir.lo

..., indices of the directions to be plotted on the lower triangle

varnames

variable names to be used

type

string, controlling whether to plot lines, points, etc (see plot)

add

boolean, add stuff to an existing diagram?

commonAxis

boolean, should vertical axes be shared by all plots in a row?

cov

boolean, is this a covariance? (if FALSE, it is a variogram)

closeplot

logical, should the plot be left open (FALSE) for further changes, or be frozen (TRUE)? defaults to TRUE

...

further parameters to matplot

Value

invisibly, the graphical parameters active before calling the function. This is useful for freezing the plot if you provided closeplot=FALSE.

How to use arguments vdir.lo and vdir.up? Each empirical variogram x has been computed along certain distances, recorded in its attributes and retrievable with command ndirections.

See Also

Other gmEVario functions: as.gmEVario.gstatVariogram(), gsi.EVario2D(), gsi.EVario3D(), ndirections(), variogramModelPlot()

Examples

library(gstat)
data("jura", package = "gstat")
X = as.matrix(jura.pred[,1:2])
Z = as.matrix(jura.pred[,c("Zn","Cd","Pb")])
vge = gsi.EVario2D(X,Z)
plot(vge)
plot(vge, pch=22, lty=1, bg="grey")

gmGeostats documentation built on April 18, 2023, 5:08 p.m.