Description Usage Arguments Value Author(s) Examples
View source: R/pyramid_chart.R
Easily create a pyramid chart
1 2 3 4 5 6 7 8 9 10 |
data |
Dataset to use for the pyramid chart |
x |
|
y |
|
group |
|
bar_colors |
|
sort |
|
xlab |
|
title |
|
An object of class ggplot
Thomas Neitmann
1 2 3 4 5 6 7 8 9 | data(popch)
pyramid_chart(popch, age, pop, sex)
## Change bar colors
pyramid_chart(popch, age, pop, sex, bar_colors = c("darkgreen", "darkorange"))
## Change x axis label and add title
pyramid_chart(popch, age, pop, sex, xlab = "Population", title = "Switzerland 2020")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.