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.
Usage
# S3 method for population
plot(
x,
group_colors = NULL,
group_legend = "Group",
age_breaks = NULL,
value_breaks = NULL,
...
)
Value
Plot of age pyramid.
Arguments
- x
Object of class population.
- 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.
- ...
Additional arguments
See Also
plot.pyramid
, age_pyramid.population
.
Examples
Run this codeplot(population(EW_pop_14$sample), time = 0)
Run the code above in your browser using DataLab