Description Usage Arguments Value Examples
This uses geom_bar, but it makes it easy to make both stacked and unstacked plots and adjust text annotations accordingly.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
data |
data frame containing dataset to use for plotting |
x |
column for x-axis |
y |
column for y-axis |
label |
column for text annotation |
color |
column for color |
stacked |
boolean whether result should be a stacked barplot or not |
constant_height |
boolean whether stacked bars should have constant height (proportions plotted) |
facet_rows |
columns for faceting by row |
facet_columns |
columns for faceting by column |
facet_type |
either "wrap" or "grid", corresponding to facet_wrap and facet_grid respectively |
... |
params to either facet_wrap or facet_grid |
ggplot object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.