plot_add_range: Low level plotting function to add range of observed values...

Description Usage Arguments Value See Also Examples

View source: R/plot-add-range.R

Description

This function can be used to add the range of observed data to a timeseries plot generated with plot_line. The density of the color gives an indication of the likelihood of the value.

Usage

1
plot_add_range(plot, ex_data)

Arguments

plot

ggplot2 object.

ex_data

Dataframe with observed values for the specific timeseries.

Value

ggplot2 plot.

See Also

Other low-level-plot functions: plot_add_box

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# There is no external data so we need to add some noise first!
ex_data <- preprocess$biomass
ex_data$atoutput <- ex_data$atoutput * runif(n = nrow(ex_data), 0, 1)
ex_data$model <- "test"

# Create the timeseries with \code{\link{plot_line}}
plot <- plot_line(preprocess$biomass)

# Add the external data as geom_rug with \code{\link{plot_add_range}}
plot_add_range(plot, ex_data)

atlantistools documentation built on Aug. 16, 2017, 9:05 a.m.