nvmulti: nvmulti Overylay scatter, line, bar, and stacked area plots...

Description Usage Arguments Examples

View source: R/nvmulti.r

Description

nvmulti Overylay scatter, line, bar, and stacked area plots on one or two vertical axes.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
nvmulti(
  ...,
  tooltip = FALSE,
  guideline = TRUE,
  interpolate = c("linear", "step", "basis", "step-before", "step-after", "bundle",
    "cardinal", "monotone"),
  xlab = "",
  ylab = "",
  ylab_right = "",
  xformat = function(x) sprintf("%d", x),
  xticks,
  col,
  xlim,
  ylim1,
  ylim2,
  options = ""
)

Arguments

...

nv_coords, nv_bar, and/or nv_area objects to plot.

tooltip

set to TRUE to display mouse hover point summary tooltip

guideline

set to TRUE to display mouse hover summary of all series

interpolate

d3.js plot interpolation option

xlab

a title for the x axis

ylab

a title for the primary y axis

ylab_right

a title for the secondary (right) y axis

xformat

function that converts numeric x-axis values to text

xticks

optional numeric vector of x tick locations

col

optional colors, one for each series

xlim

an optional numeric vector of two values of lower and upper x-axis limits

ylim1

an optional numeric vector of two values of lower and upper left y-axis limits

ylim2

an optional numeric vector of two values of lower and upper right y-axis limits

options

advanced JavaScript options

Examples

1
2
3
4
area = nv_area(as.matrix(cbind(seq(nrow(iris)), iris[, -5])))
total = nv_coords(x=seq(nrow(iris)), y=apply(iris[, -5], 1, sum), type="line", key="TOTAL")
p = nvmulti(area, total, col=c("#8dd3c7", "#ffffb3", "#fb8072", "#80b1d3", "#000000"))
nvd3(p)

bwlewis/nvd3 documentation built on July 13, 2021, 9:02 p.m.