Draw a vertically stacked bar chart with ggplot2
stacked_bar(x, col = NULL, top = NULL, title = NULL, x_label = NULL, y_label = NULL)
| x | a data frame |
|---|---|
| col | the column to be stacked, quoted |
| top | the number of items to include, numeric |
| title | chart title, quoted |
| x_label | chart x axis label, quoted |
| y_label | chart y axis label, quoted |
plot
# NOT RUN { stacked_bar(affiliations, col = "normalizedname", top = 10, title = "Papers by Affiliation", x_label = "Affiliation", y_label = "Publication Count") # }