View source: R/gta plot saver.R
gta_plot_saver | R Documentation |
This function saves ggplot objects as png and eps. Optimized for width of A4 paper, but can be changed accordingly.
gta_plot_saver(
plot = NULL,
path = "/",
name = "plot",
width = 21,
height = NULL,
png = T,
eps = F,
pdf = F,
jpg = F,
cairo_ps = F,
aspect.ratio = 21/29.7
)
plot |
Specify the plot to save. |
path |
Specify the folder to save the plot into as string. Default: working directory. |
name |
Input the name of the plot as string. Default: "plot". |
width |
Takes in a specific plot height. If unspecified, height will be calculated through aspect.ratio. |
png |
Set png output to FALSE. Default: TRUE. |
eps |
Set cairo_ps output to TRUE if you want to generate an eps file with transparency levels. Default: FALSE. |
aspect.ratio |
Define the aspect ratio of the plot as integer. Width = 1, height = 1*aspect.ratio. If height is defined, aspect.ratio does have no effect. |
Global Trade Alert
www.globaltradealert.org
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.