View source: R/plot.mekko.bf.R
plot.mekko.bf | R Documentation |
Plot a mekko chart
## S3 method for class 'mekko.bf'
plot(data, x, y, plot.title = "", plot.fig.num = "",
caption = "", group.by = NULL, legend.title = "", colours = NULL,
unit.x = "", unit.y = "", x.axis = "", y.axis = "", export = FALSE,
export.name = "")
data |
Data to use |
x |
String. The X axis - the values that the width of each bar will represent |
y |
String. The Y axis - what the height of bars will represent |
plot.title |
Character denoting title of the plot |
plot.fig.num |
Character denoting plot number (or another plot annotations) |
caption |
Character that denotes caption (Sources) |
group.by |
String. Variable that the bar should be coloured by |
legend.title |
Character denoting the title for the colour legend |
colours |
Vector (or set.colour function) of colours to use. If not, default palette is generated. |
unit.x |
Character denoting the unit for x-axis. Special formatting for % and $ |
unit.y |
Character denoting the unit for y-axis. Special formatting for % and $ |
x.axis |
Character denoting the x axis title |
y.axis |
Character denoting the y axis title |
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.mekko.bf(mtcars,"mpg","disp")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.