ggpng: Create a picture with a transparent background.

Description Usage Arguments Details Value Author(s)

View source: R/ggpng.R

Description

Use the ImageMagick command line to convert the PDF saved by ggplot2 to PNG format with a transparent background and to set the resolution.

Usage

1
2
3
ggpng(x, dpi = 600, ...)

ggPNG(x, p, dpi = 600, ...)

Arguments

x

A file name that does not have a suffix.

dpi

The default dpi is 600. You can enhance the dpi value to produce a higher resolution PNG file.

...

see :ggsave

p

ggplot2 object

Details

You need to install ImageMagick! Please check if the ImageMagick is added to the environment variable.

this ggplot2 object will automatically add a theme with a transparent background.

Value

You will get a PNG file with the result drawn by ggplot2.

Author(s)

Chai


ch documentation built on July 9, 2021, 9:07 a.m.