Description Usage Arguments Value
View source: R/finalise_plot.R
Running this function will save your plot with the assumed guidelines from the TfL Digital Design guidelines It will left align your title, subtitle and source, add the TfL blocks at the bottom right and save it to your specified location.
1 2 3 | finalise_plot(plot_name, caption = "", figure_number = "",
save_filepath = file.path(Sys.getenv("TMPDIR"), "tmp-nc.png"),
width_pixels = 640, height_pixels = 450, background_colour = NULL)
|
plot_name |
The variable name of the plot you have created that you want to format and save |
caption |
The text you want to come in your figure caption (top left) |
figure_number |
The figure value to associate with your figure |
save_filepath |
Exact filepath that you want the plot to be saved to |
width_pixels |
Width in pixels that you want to save your chart to - defaults to 640 |
height_pixels |
Height in pixels that you want to save your chart to - defaults to 450 |
background_colour |
The colour you want for the background of your plot - defaults to white |
(Invisibly) an updated ggplot object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.