Description Usage Arguments Value
View source: R/finaliseGraph.R
Function for finalising a plot - resize, add logo and caption, then save.
Running this function will save the given or last plot with the correct guidelines for publication. It will left align title, subtitle and caption, add the given logo at the bottom right and save it to a specified file name and location.
Basis of this is the BBCplot function
1 2 3 4 5 6 7 8 9 10 11 12 |
plot |
The name of the plot |
caption |
The text for the caption. "None" for no caption. "Existing" for the existing caption |
filename |
Desired file name |
filepath |
Path to the directory |
size |
Specify the size - "full", "half", "long", or "manual", which references height and width |
width |
Width in pixels defaults to 640 |
height |
Height in pixels defaults to 450 |
unit |
Default is pixels (px), but accepts cm |
logo_path |
File path for the logo image - PNG format |
overwrite |
Whether to overwrite existing files, without asking |
An updated ggplot object invisibly
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.