Skip to contents

Layers

Draw the bars, label them, and outline a second population for comparison.

geom_pyramid() stat_pyramid()
Bars of a population pyramid
geom_pyramid_text()
Value labels on a population pyramid
geom_pyramid_outline()
A stepped outline of a population pyramid

Position, coordinates and scales

Mirror one side, label both sides with absolute values, and place the age axis.

position_pyramid()
Mirror one side of a population pyramid
coord_pyramid()
Cartesian coordinates for a population pyramid
scale_x_pyramid() scale_y_pyramid()
Position scales for the value axis of a pyramid

Themes

A theme suited to back-to-back bars.

theme_pyramid()
A theme for population pyramids

Data

Example population data.

europe_pop
Population of four European countries by age group and sex

Extending ggpyramid

The ggproto classes behind the layers, for building new ones.