save_png: Save ggplots into multiple png files

Description Usage Arguments Details Examples

View source: R/save-png.R

Description

This function takes ggplots and save them into png images with fixed size

Usage

1
save_png(base.size = 1, ...)

Arguments

numeric.

Indicates the multiplication factor to the default width (777 pixels) and height (480 pixels)

Details

The function saves png files with filename equal to the name of the ggplot object. The png image is saved with a height of 480 pixels and width scaled by the golden ratio to 777 (776.66 but rounded to nearest integer)

Examples

1
2
3
4
g1 <- density_chart(mtcars, "mpg", "cyl")
mtcars$name <- rownames(mtcars)
g2 <- bar_chart(mtcars, "mpg", "name", flip = T)
save_png(g1,g2)

pgarnry/ggplotHelper documentation built on May 25, 2019, 2:54 a.m.