plot.line.bf | R Documentation |
Plot a line chart Make sure you don't confuse between x and y. X is what goes on the bottom (Year...)
## S3 method for class 'line.bf'
plot(data, x, y, group.by = NULL, show.points = FALSE,
cat.order = NULL, ingraph.labels = FALSE, colours = NULL,
plot.title = "", plot.fig.num = "", plot.limit = NULL, unit.x = "",
unit.y = "", x.axis = "", y.axis = "", legend.title = "",
caption = "", export = FALSE, export.name = "")
data |
Data to use |
x |
The X axis the line will be connected along this point |
y |
The Y axis points will reside along this |
group.by |
Line colour will be determined by this |
show.points |
TRUE/FALSE whether to show the points on the line or not |
cat.order |
Put the order of categorical variable in here (as a vector) c("cat.1","cat.2","cat.3") and so on. If you don't, a default order will be generated. |
ingraph.labels |
TRUE/FALSE whether to show a label at the end of the line |
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) |
plot.limit |
Vector of form c(x.min,x.max,y.min,y.max) |
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 |
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.line.bf(data,"Year","Income",group.by="Gender")
plot.line.bf(data,"Education","Count",cat.order = c("High School","Bachelor's","Master's","PhD"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.