dualplot: dualplt: dualplot function from Peter Ellis...

Description Usage Arguments Value Note Examples

Description

dualplt: dualplot function from Peter Ellis (github.com/ellisp) for time series plots on double axes

Usage

1
2
3
4
5
6
7
8
dualplot(x1, y1, y2, x2 = x1, col = c("#C54E6D", "#009380"), lwd = c(1,
  1), colgrid = NULL, mar = c(3, 6, 3, 6) + 0.1,
  ylab1 = paste(substitute(y1), collapse = ""),
  ylab2 = paste(substitute(y2), collapse = ""), nxbreaks = 5,
  yleg1 = paste(gsub("\n$", "", ylab1), "(left axis)"),
  yleg2 = paste(ylab2, "(right axis)"), ylim1 = NULL, ylim2 = NULL,
  ylim.ref = NULL, xlab = "", main = NULL, legx = "topleft",
  legy = NULL, silent = FALSE, bty = "n", ...)

Arguments

x1:

vector of x (horizontal) coordinates for the first line

y1:

vector of y (vertical) coordinates for the first line

x2:

vector of x (horizontal) coordinates for the second line

y2:

vector of y (vertical) coordinates for the second line

col:

vector of colors

Value

ggplot object

Note

Useful for some time series representations

Examples

1
  dualplot(1:100, runif(100), 10*runif(100))

eloualiche/miscr documentation built on May 16, 2019, 3:57 a.m.