nvbarplot: nv barplot

Description Usage Arguments Value

View source: R/nvbarplot.r

Description

nv barplot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
nvbarplot(
  height,
  space = 0.1,
  names.arg = NULL,
  beside = FALSE,
  horiz = FALSE,
  col = NULL,
  xlab = NULL,
  ylab = NULL,
  axes = TRUE,
  axisnames = TRUE,
  xaxt = "s",
  yaxt = "s",
  rotateLabels = 0,
  showControls = TRUE,
  tickNumFormat = ",.1f",
  ...
)

Arguments

height

either a data.frame, vector or matrix of values describing the bars which make up the plot. If height is a vector, the plot consists of a sequence of rectangular bars with heights given by the values in the vector. If height is a matrix and beside is FALSE then each bar of the plot corresponds to a column of height, with the values in the column giving the heights of stacked sub-bars making up the bar. If height is a matrix and beside is TRUE, then the values in each column are juxtaposed rather than stacked. If height is a data.frame then an attempt to coerce it into matrix form is made using the dftab function.

space

bar group spacing (scalar value)

names.arg

a vector of names to be plotted below each bar or group of bars. If this argument is omitted, then the names are taken from the names attribute of height if this is a vector, or the column names if it is a matrix.

beside

a logical value. If FALSE, the columns of height are portrayed as stacked bars, and if TRUE the columns are portrayed as juxtaposed bars.

horiz

a logical value. If FALSE, the bars are drawn vertically with the first bar to the left. If TRUE, the bars are drawn horizontally with the first at the bottom.

col

optional vector of bar component colors

xlab

x-axis label

ylab

y-axis label

axes

if TRUE display the bar axis and its values. axes=FALSE is equivalent to yaxt='n' when horiz=FALSE.

axisnames

if TRUE display the group axis and its values. axisnames=FALSE is equivalent to xaxt='n' when horiz=FALSE.

xaxt

set to 'n' to suppress drawing x axis, otherwise plot the x axis.

yaxt

set to 'n' to suppress drawing x axis, otherwise plot the x axis.

rotateLabels

axis text rotation in degrees

showControls

set to TRUE to display interactive controls

tickNumFormat

format numeric tick labels using a d3.format string (d3.js)

...

optional additional named plot options passed directly to nvd3.js (see examples)

Value

An htmlwidget object that is displayed using the object's show or print method. (If you don't see your widget plot, try printing it with the print function.)


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