View source: R/plot.pyramid.bf.R
plot.pyramid.bf | R Documentation |
Plot a pyramid Make sure diff is 2 groups and x has the aggregated value
## 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 = "")
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 |
ggplot2 object with all the right formatting
plot.pyramid.bf(data,"Count","Gender","Age")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.