Learn R Programming

dbmss (version 2.7-1)

autoplot: ggplot methods to plot dbmss objects

Description

S3 methods for the autoplot generic.

Usage

# S3 method for envelope
autoplot(object, …, ObsColor = "black", H0Color = "red",
        ShadeColor = "grey75", alpha=0.3, main = NULL, 
        xlab = NULL, ylab = NULL, 
        LegendLabels = c("Observed", "Expected", "Confidence\n enveloppe"))

Arguments

object

An object to be plotted.

Extra arguments, currently unused.

ObsColor

The color of the line representing observed values of the function.

H0Color

The color of the line representing the null hypothesis values of the function.

ShadeColor

The color of the confidence envelope.

alpha

The opacity of the confidence envelope, between 0 and 1.

main

The title of the plot.

xlab, ylab

The axes labels.

LegendLabels

A vector of characters. The first two items describe the observed and null-hypothesis curves, the last item the confidence interval.

Value

A ggplot object.

Examples

Run this code
# NOT RUN {
data(paracou16)
# Keep only 20% of points to run this example
X <- as.wmppp(rthin(paracou16, 0.2))

# Plot the envelope (should be 1000 simulations, reduced to 20 to save time)
autoplot(KdEnvelope(X, ReferenceType="Q. Rosea", NumberOfSimulations=20))
# }

Run the code above in your browser using DataLab