View source: R/plot.change.arrow.bf.R
plot.change.arrow.bf | R Documentation |
Plot a change graph
## S3 method for class 'change.arrow.bf'
plot(data, x, cat, time.var, order.by = "change",
annotate = FALSE, label = FALSE, nudge.beg = 0.02, nudge.end = 0.015,
unit.x = "", x.axis = "", y.axis = "", plot.title = "",
plot.fig.num = "", caption = "")
data |
Data to use |
x |
String. Column name for the X axis - the value the categories plotted are changing |
cat |
String. Column name for the category of things that are changing |
time.var |
String. Column name of variable that denotes time - time has to be numeric |
order.by |
String. One of "change" or "value", way to order the categories. Either by the magnitude of change, or the absolute magnitude |
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 |
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) |
ggplot2 object with all the right formatting
plot.change.arrow.bf(change.gdp,"gdp","country","year")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.