finalise_plot: Arrange alignment and save TfL ggplot chart

Description Usage Arguments Value

View source: R/finalise_plot.R

Description

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.

Usage

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)

Arguments

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

Value

(Invisibly) an updated ggplot object.


alex-drake/tflplot documentation built on July 28, 2019, 6:28 p.m.