Draw population pyramids.
draw_pyramid(
x,
show_value = TRUE,
show_prop = TRUE,
left_axis = NULL,
right_axis = NULL,
axis_fm = "g",
axis_bm = "",
axis_bi = 3,
cgap = 0.3,
cstep = 1,
csize = 1,
labs = c("Males", "Ages", "Females"),
gl = TRUE,
cadj = 0,
cols = c("#006400", "#b32134"),
dens = c(-1, -1),
main = "",
grid = c(2, 3)
)
Class of 'canreg' or 'fbswicd'.
Logical value to draw the population numbers. Default is TRUE.
Logical value to draw the pyramid using proportion. Default is TRUE.
A vector of axis for left pyramid. If missing, automatically given using pretty().
A vector of axis for right pyramid. If missing, left_axis is used.
A format code of formatC for plotting axis. If missing, "g" is used.
A big.mark of formatC for plotting axis. If missing, none.
A big.interval number of formatC for plotting axis. Default is 3.
The width of center gap (as ratio to each panel) to draw age-class. Default is 0.3.
The interval to write the labels of age classes. Default is 1.
The font size factor to write the labels of age classes. Default is 1.
The label of the left, center, and right pyramid. Default is c("Males", "Ages", "Females").
Logical value to draw the vertical dotted lines. Default is TRUE.
The vertical adjustment factor for the labels of age classes. Default is -0.03.
The color of the left and right pyramid. Default is c("lightblue", "pink").
The density of hatching lines (/inch) for left and right pyramid. Default is c(-1, -1), when the pyramid will be filled.
The main title of the pyramid.
Grids.
Pyramids plot.