utility_export | R Documentation |
Exporting plots as PDF or PowerPoint graphics
savePDF(
graphicsObject = ggplot2::last_plot(),
outputFileName = "plot.pdf",
width = 8,
height = 5,
embedFont = F,
gsPath = "C:/gs/gs9.16/bin/gswin32c.exe",
gsOption =
"-sFONTPATH=C:/Windows/Fonts -dCompressFonts=true -dSubsetFonts=false -dEmbedAllFonts=true"
)
savePPTX(
graphicsObject = ggplot2::last_plot(),
outputFileName = "plot.pptx",
width = 8,
height = 5
)
graphicsObject |
The plot object to be saved. If missing, the most recently depicted plot will be retrieved using ggplot2::last_plot or recordPlot. Note: recordPlot is not compatible with exporting an editable vector graphic in PowerPoint. |
outputFileName |
The name of the exported PDF file. |
width |
A width. |
height |
A height. |
embedFont |
Whether the fonts need to be embedded using Ghostscript. Default is False. |
gsPath |
A path to the Ghostscript exe file. |
gsOption |
A character vector containing options to Ghostscript. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.