Description Usage Arguments Value Examples
Save a ggplot2
plot as png with an optional Sorenson Impact branding bar.
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)
|
filename |
Filename to create on disk. If "auto", defaults to the title of the |
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 |
A png of the last plot with optional SI logo band.
1 2 | minter_colorplot() + ggplot2::ggtitle("My Title")
minter_ggsave(add_logo = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.