Learn R Programming

spMC (version 0.3.15)

plot.density.lengths: Plot Empirical Densities Estimates of Stratum Lengths

Description

The function plot the empirical densities of stratum lengths computed along a given direction.

Usage

# S3 method for density.lengths
plot(x, main = NULL, xlab = NULL, ylab = "Density", type = "l",
     zero.line = TRUE, ...)

Value

An image is produced on the current graphics device. No values are returned.

Arguments

x

an object of the class density.lengths, typically with the output of the function density.lengths.

main

an overall title for the plot.

xlab

a title for the \(x\)-axis.

ylab

a title for the \(y\)-axis.

type

plotting parameter for the type of graphic (see plot).

zero.line

logical value. If TRUE (by default), the function adds a base line at \(y = 0\).

...

other plotting parameters.

Author

Luca Sartore drwolf85@gmail.com

See Also

density.default, density.lengths, plot, print.density.lengths

Examples

Run this code
# \donttest{
data(ACM)
direction <- c(0,0,1)
     
# Compute the appertaining directional line for each location
loc.id <- which_lines(ACM[, 1:3], direction)
     
# Estimate stratum lengths
gl <- getlen(ACM$MAT3, ACM[, 1:3], loc.id, direction)

# Compute the empirical densities of stratum log-lengths
dgl <- density(gl, log = TRUE)

# Plot the empirical densities of stratum log-lengths
plot(dgl)
# }

Run the code above in your browser using DataLab