plot_population: Plot the age pyramid of a population data frame (at a given time).
Description
Plot an age pyramid from age pyramid data frame with possibly several characteristics. See also plot_pyramid and age_pyramid.
Usage
plot_population(
population,
group_colors,
group_legend = "Group",
age_breaks,
value_breaks,
...
)
Value
Plot of age pyramid.
Arguments
- population
Population data frame, with at least birth and death column.
- group_colors
(Optional) Named character vector.
- group_legend
(Optional) Legend title name. By default set to "Group".
- age_breaks
(Optional) An ordered vector of indexes of vector unique(pyr$age) used for breaks for the axis of ages.
- value_breaks
(Optional) Breaks for the axis of values.
- ...
Other arguments passed to age_pyramid (including time).
Examples
Run this codeplot_population(EW_pop_14$sample, time = 0)
Run the code above in your browser using DataLab