Learn R Programming

geoR (version 1.0-0)

plot.variogram: Plot Empirical Variogram

Description

Plots sample (empirical) variogram computed using the function variog.

Usage

plot.variogram(obj, max.dist = max(obj$u), ylim = "default",
               type = "b", scaled = FALSE, var.lines = FALSE,
               envelope.obj = NULL, bin.cloud = FALSE, ...)

Arguments

obj
an object of the class "variogram", typically an output of the function variog.
max.dist
maximum distance for the x-axis. The default is the maximum distance for which the sample variogram was computed.
ylim
limits for the variogram values in the y-axis. The default is from 0 to the maximum value in obj$v.
type
type of line for the empirical variogram. The default is "b" (dots and lines). For further details see documentation for lines.
scaled
If TRUE the variogram values are divided by the sample variance. This allows comparison between variograms from different variables.
var.lines
If TRUE a horizontal line is drawn at the value of the variance of the data (if scaled = F) or at 1 (if scaled = T).
envelope.obj
adds a variogram envelope computed by the function variog.model.env or variog.mc.env.
bin.cloud
logical. If TRUE and the sample variogram was computed with the option keep.cloud = TRUE, box-plots of values at each bin are plotted instead of the empirical variograms.
...
other arguments to be passed to the function plot.

Value

  • Produces a plot with the sample variogram on the current graphics device. No values are returned.

Details

This function allows visualization of sample variogram and together with lines.variogram can be used to compare sample variograms for different variables. Furthermore, together with lines.variomodel can be used to compare theoretical and/or fitted variogram models against the empirical variogram.

References

Further information about geoR can be found at: http://www.maths.lancs.ac.uk/~ribeiro/geoR.html.

See Also

variog for variogram calculations, lines.variogram and lines.variomodel for adding lines to the current plot, variog.model.env and variog.mc.env for variogram envelops computation, and plot for generic plot function.

Examples

Run this code
sim <- grf(100, cov.pars=c(1, .2))# generates simulated data
vario <- variog(sim, max.dist=1)  # computes sample variogram
par(mfrow=c(1,2))
plot(vario)                       # the sample variogram
plot(vario, scaled=T)             # the scaled sample variogram

Run the code above in your browser using DataLab