Learn R Programming

ggfortify (version 0.4.1)

plot_confint: Attach confidence interval to ggplot2::ggplot

Description

Attach confidence interval to ggplot2::ggplot

Usage

plot_confint(p, data = NULL, lower = "lower", upper = "upper",
  conf.int = TRUE, conf.int.geom = "line", conf.int.colour = "#0000FF",
  conf.int.linetype = "none", conf.int.fill = "#000000",
  conf.int.alpha = 0.3)

Arguments

p

ggplot2::ggplot instance

data

data contains lower and upper confidence intervals

lower

column name for lower confidence interval

upper

column name for upper confidence interval

conf.int

Logical flag indicating whether to plot confidence intervals

conf.int.geom

geometric string for confidence interval. 'line' or 'step'

conf.int.colour

line colour for confidence intervals

conf.int.linetype

line type for confidence intervals

conf.int.fill

fill colour for confidence intervals

conf.int.alpha

alpha for confidence intervals

Value

ggplot

Examples

Run this code
# NOT RUN {
d <- fortify(stats::acf(AirPassengers, plot = FALSE))
p <- ggplot(data = d, mapping = aes(x = Lag))
ggfortify:::plot_confint(p, data = d)
# }

Run the code above in your browser using DataLab