agg_shading: Add shading between series

Description Usage Arguments See Also Examples

View source: R/gg-constructors.R

Description

Add shading between series

Usage

1
agg_shading(from, to, panel = NULL, colour = RBA["Grey2"], color)

Arguments

from

The series name to shade from (if you have no group aesthetic, it will be the name of the y variable); if you have groups, it will be the group identifier. This can get more complicated if you have duplicate group names.

to

The name of the series to shade to

panel

(optional) Which panel are the relevant series in? (arphit will try to find them if you don't specify)

colour

(optional) The colour to shade between the series (default grey)

color

(Deprecated; use colour instead) The colour to shade

See Also

vignette("plotting-options", package = "arphit") for a detailed description of all the plotting options

Examples

1
2
3
4
5
6
7
8
data <- data.frame(date = seq.Date(from = as.Date("2000-03-10"),
                                   length.out = 12, by = "month"),
                   x1 = rnorm(12),
                   x2 = rnorm(12))
arphitgg(data, agg_aes(x = date)) +
  agg_line(agg_aes(y = x1), colour = RBA["Blue2"]) +
  agg_line(agg_aes(y = x2), colour = RBA["Red4"]) +
  agg_shading(from = x1, to = x2)

angusmoore/arphit documentation built on Feb. 15, 2021, 9:40 a.m.