glBar.default | R Documentation |
Default method for interactive bar plot.
## Default S3 method:
glBar(
x,
yval,
names.arg = rownames(x),
ndigits = NULL,
signif = 6,
xlab = NULL,
ylab = yval,
main = NULL,
height = 400,
width = 500,
colval = NULL,
annot = yval,
flag = NULL,
info = NULL,
...
)
x |
the data.frame containing data to plot. |
yval |
the column name for the x-axis values. |
names.arg |
the column name for the label on each bar. |
ndigits |
the number of digits after the decimal to round to in the tooltip (overrides signif). |
signif |
the number of significant figures to display in the tooltip. |
xlab |
the label on the x-axis. |
ylab |
the label on the y-axis. |
main |
the title for the plot. |
height |
the height of the plot (in pixels). |
width |
the width of the plot (in pixels). |
colval |
the colours for each data point. |
annot |
the columns to display in the tooltip. |
flag |
the special flag to indicate special plot. |
info |
additional information for plotting. |
... |
additional arguments. |
A chart object containing the information to create an interactive bar plot.
Shian Su
data(mtcars)
counts <- table(mtcars$gear)
data <- data.frame(nGears=as.numeric(names(counts)), Count=as.numeric(counts))
plot1 <- glBar(data, "Count", "nGears", ylab="Number of Gears")
glimma_plot(plot1, layout=c(1,1), launch=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.