finalise_newsroom2: Finalise a chart for newsroom camera 2

View source: R/finalise_newsroom2.R

finalise_newsroom2R Documentation

Finalise a chart for newsroom camera 2

Description

Tweaks the margins and adjusts for fisheye distortion to suit newsroom camera 2. The parameters have been set by trial and error

Usage

finalise_newsroom2(plot, save_filepath, ...)

Arguments

plot

the plot to output

save_filepath

where to save it.

...

other arguments passed through to [finalise_tv()]

Examples


library(bbplot2)
library(ggplot2)

plot <- ggplot(uk_gdp, aes(x = date, y = value)) +
  geom_line(colour = tvcols["news"], lineend = "round", linewidth = 1.2) +
  labs(
    title = "Quarterly UK GDP",
    caption = "Source: Office for National Statistics"
  ) +
  plasma_style() +
  scale_y_continuous(
    label = scales::label_dollar(
      prefix = "£",
      scale_cut = c(" " = 0, "bn" = 1e3, "tn" = 1e6)
    )
  ) +
  annotate("label", lubridate::ymd("1980-01-01"),
    450000,
    label = "The eighties"
  )

finalise_newsroom2(plot, "fisheye_plot.png")

## delete files with base::unlink()
unlink("fisheye_plot.png")

bbcuffer/rcutils documentation built on Nov. 10, 2023, 12:08 p.m.