plot_stackedbar | R Documentation |
plot stacked bar
plot_stackedbar(data, label_x = "", label_y = "", colors = NULL, alpha = 1)
data |
data.frame contain x, value, and variable |
label_x |
x-axis label |
label_y |
y-axis label |
colors |
color vector |
alpha |
level of transparency |
ggplot graphic
data <- iris |> dplyr::group_by(Species) |>
dplyr::summarize(Sepal.Length=mean(Sepal.Length), Sepal.Width=mean(Sepal.Width))
grf <- plot_stackedbar(data, colors=c("blue", "red"))
plot(grf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.