minter_ggsave: Save a branded plot

Description Usage Arguments Value Examples

Description

Save a ggplot2 plot as png with an optional Sorenson Impact branding bar.

Usage

1
2
3
4
minter_ggsave(filename = "auto", dir = "auto",
  plot = ggplot2::last_plot(), width = 6, height = 4, dpi = 300,
  add_logo = FALSE, logo_height_ratio = 0.05,
  band_color = minter_design$granite)

Arguments

filename

Filename to create on disk. If "auto", defaults to the title of the last_plot within the plot_directory.

dir

Directory to save file to. Defaults to "auto", which places plots in a "plots" subdir of the script dir.

plot

Plot to save, defaults to last plot displayed.

width

Width in inches (default: 6).

height

Height in inches (default: 4).

dpi

Dots per inch. Defaults to 300. The resolution of the file will be width*DPI by height*DPI.

add_logo

Logical. Add the sorenson impact branding bar?

logo_height_ratio

Number between 0 and 1, with sensibile values between .01 and .1. The percent of the image height that the bar should be. Default is 0.05.

band_color

The color of the SI Logo band. Defaults to minter_design$granite.

Value

A png of the last plot with optional SI logo band.

Examples

1
2
minter_colorplot() + ggplot2::ggtitle("My Title")
minter_ggsave(add_logo = TRUE)

jrminter/minterbrand documentation built on May 26, 2019, 5:41 p.m.