BarView | R Documentation |
Bar plot
BarView(
df,
x = "x",
y = "y",
fill = "#FC6665",
bar.width = 0.8,
position = "dodge",
dodge.width = 0.8,
main = NA,
xlab = NULL,
ylab = NA,
...
)
df |
A data frame. |
x |
A character, specifying the x-axis. |
y |
A character, specifying the y-axis. |
fill |
A character, specifying the fill color. |
bar.width |
A numeric, specifying the width of bar. |
position |
"dodge" (default), "stack", "fill". |
dodge.width |
A numeric, set the width in position_dodge. |
main |
A charater, specifying the figure title. |
xlab |
A character, specifying the title of x-axis. |
ylab |
A character, specifying the title of y-axis. |
... |
Other parameters in geom_bar |
An object created by ggplot
, which can be assigned and further customized.
Wubing Zhang
mdata = data.frame(group=letters[1:5], count=sample(1:100,5))
BarView(mdata, x = "group", y = "count")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.