Skip to contents

Draw a ggplot layer for a potData object.

Usage

# S3 method for potData
autolayer(object,
         type = c("RLplot", "timeplot"),
         aes = FALSE,
         xVar = c("T", "p"),
         group,
         points = c("p", "H"), a = 0.5,
          ...)

Arguments

object

A potData object.

type

See autoplot.potData.

aes

Logical. If TRUE the colour, fill and shape of the points are used within the aesthetic function aes wo they are registred to appear in legends.

xVar

See autoplot.potData.

group

See autoplot.potData.

points, a

See autoplot.potData. ' "p". See RP.potData.

...

Other arguments passed to geom_point.

Value

A ggplot object.

Note

With aes = TRUE it can be needed to reset the scales to avoid the creation of confusing legends. The package ggnewscale can be of some help then.

Examples

fit <- poisGP(data = Garonne, threshold = 2800)
RL <- RL(fit)
g <- autoplot(RL)
g

pdat <- as.potData(Garonne)
g1 <- g + autolayer(pdat, aes = TRUE)
g1