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

plot.density.lengthsR Documentation

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 class 'density.lengths'
plot(x, main = NULL, xlab = NULL, ylab = "Density", type = "l",
     zero.line = TRUE, ...)

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.

Value

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

Author(s)

Luca Sartore drwolf85@gmail.com

See Also

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

Examples


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)

spMC documentation built on May 3, 2023, 9:13 a.m.