View source: R/plot_stackedbar.R
plot_stackedbar | R Documentation |
Created stackedbar in kedata style
plot_stackedbar(
data,
x,
y,
fill,
title,
subtitle,
data_source,
x_title,
y_title
)
data |
data frame |
x |
colname for x variable |
y |
colname for y variable |
fill |
colname for fill |
title |
character |
subtitle |
character |
data_source |
character |
x_title |
character |
y_title |
character |
ggplot object
## Not run:
library(ggplot2)
library(dataplot)
library(tidyr)
library(dplyr)
df1 <- mpg %>%
count(manufacturer, class)
plot_stackedbar(data = df1,
x = "manufacturer",
y = "n",
fill = "class",
x_title = "col_x",
y_title = "col_y",
title = "Lorem Ipsum is simply dummy text",
subtitle = "Contrary to popular belief, Lorem Ipsum is not simply random text",
data_source = "www.kedata.online")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.