plot.pyramid.bf: Plot a pyramid Make sure diff is 2 groups and x has the...

View source: R/plot.pyramid.bf.R

plot.pyramid.bfR Documentation

Plot a pyramid Make sure diff is 2 groups and x has the aggregated value

Description

Plot a pyramid Make sure diff is 2 groups and x has the aggregated value

Usage

## S3 method for class 'pyramid.bf'
plot(data, x, diff, group, group.order = NULL,
  colours = NULL, plot.title = "", plot.fig.num = "", unit.x = "",
  x.axis = "", y.axis = "", legend.title = "", caption = "",
  export = FALSE, export.name = "")

Arguments

data

Data to use

x

The X axis - the values that the bars will represent

diff

The 2 groups the bar will contrast

group

All the different groups that the ar will show (age groups)

group.order

Order in with the group is displayed in

colours

Vector (or set.colour function) of colours to use. If not, default palette is generated.

plot.title

Character denoting title of the plot

plot.fig.num

Character denoting plot number (or another plot annotations)

unit.x

Character denoting the unit for x-axis. Special formatting for % and $

x.axis

Character denoting the x axis title

y.axis

Character denoting the y axis title

legend.title

Character denoting the title for the colour legend

caption

Character that denotes caption (Sources)

export

TRUE/FALSE whether to export file as EPS under default options (height=scaled according to row number and cell number, width=12 inches)

export.name

Name of the exported EPS file

Value

ggplot2 object with all the right formatting

Examples

plot.pyramid.bf(data,"Count","Gender","Age")

BrookfieldIIE/BFTheme documentation built on March 24, 2023, 12:42 p.m.