Learn R Programming

ipeaplot (version 0.4.1)

save_pdf: Save the chart in PDF format

Description

Convenient function to save charts in PDF format.

Usage

save_pdf(gplot, file.name, ...)

Value

An "PDF" file

Arguments

gplot

ggplot which will be saved.

file.name

Character. Name of the file which will be generated

...

Additional arguments to be passed to the ggsave function from the ggplot2 package.

See Also

Other save: save_eps()

Examples

Run this code
# \donttest{
# Creating theme for ggplot2 graph using default arguments
library(ggplot2)
fig_raw <- ggplot() +
  geom_col(data = mtcars, aes(x = hp , y = mpg, fill = cyl)) +
  theme_ipea()
# Save ggplot output
save_pdf(fig_raw,file.name = paste0(tempdir(),"/figura.pdf"))
# }

Run the code above in your browser using DataLab