Skip to contents

This function uses ggplot2 framework to plot semivariogram object (tibble) result from fit_multiple_variogram.

Usage

plot_multiple_variogram(object, plot_type = "line", show_range = TRUE)

Arguments

object

An output from fit_multiple_variogram function

plot_type

plot type "bar" or "line". "linePoint" or "pointLine" or "line", or "point" are used to use point and line format.

show_range

(logical) whether to display range in the plot

Value

A list with multiple semivariance plot for all variables and a tibble with fitted semivariances for all variables.

References

Pebesma, E.J., 2004. Multivariable geostatistics in S: the gstat package. Computers & Geosciences, 30: 683-691. Benedikt Gräler, Edzer Pebesma and Gerard Heuvelink, 2016. Spatio-Temporal Interpolation using gstat. The R Journal 8(1), 204-218

Hiemstra, P.H., Pebesma, E.J., Twenhofel, C.J.W. and G.B.M. Heuvelink, 2008. Real-time automatic interpolation of ambient gamma dose rates from the Dutch Radioactivity Monitoring Network. Computers & Geosciences.DOI:

H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2016.

Examples

##  Run semivariance on Principal Component Axis1
# read data
data("landcover")

# remove factor variable

landcover$class_name <- NULL

# fit multiple variograms

mvfit  <- fit_variogram(data = landcover, response = "MPC1", coords = NULL)

mvplot <- plot_variogram(object = mvfit, length = 99, show_range = TRUE)


if (FALSE) {
# load data
data("landcover")

# remove factor variable
landcover$Class_name<- NULL

# fit multiple variograms
mfit  <- multiple_variogram(data = landcover,coords = NULL, length = 99)

mplot <- plot_multiple_variogram (mfit, plot_type = "line", show_range = FALSE)

# Display the plot

mplot$plot

# View tibble
mplot$data
}