plot_abc: Plot area between curves

View source: R/utils-plot.R

plot_abcR Documentation

Plot area between curves

Description

Plot area between curves, posterior and prior.

Usage

plot_abc(
  data,
  fill = "#2980B9",
  alpha = 0.7,
  plot = TRUE,
  xlab = NULL,
  ylab = NULL,
  title = NULL,
  ...
)

Arguments

data

Data frame with posterior and prior values. This can be obtained with plot_acc.

fill

Filling colour between curves.

alpha

Transparency value for the shaded area between curves.

plot

Boolean flag to indicate whether a plot should be generated or just return a data frame with posterior and prior values.

xlab

x-axis label.

ylab

y-axis label.

title

Plot title.

...

Optional parameters for ggplot2::geom_ribbon.

Value

List with ggplot2 object and area between curves (ABC).

Examples

## Not run: 
out <- read.table("Bacon_runs/core/core_K.out")
out <- plot_acc(out$K, out$output)
plot_abc(out$data)

## End(Not run)


special-uor/ageR documentation built on July 10, 2024, 10:08 p.m.