View source: R/addShadedBackground.R
Adds vertical lines to an existing plot using any variable that shares the same length as the time axis of the current plot. Line widths corresponds to magnitude of values.
1 2 3 4 5 6 7 8 | addShadedBackground(
param,
timeAxis,
breaks = stats::quantile(param, na.rm = TRUE),
col = "blue",
maxOpacity = 0.2,
lwd = 1
)
|
param |
vector of data to be represented |
timeAxis |
vector of times of the same length as param |
breaks |
set of breaks used to assign colors |
col |
color for vertical lines |
maxOpacity |
maximum opacity |
lwd |
line width |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.