utility_export: Exporting plots as PDF or PowerPoint graphics

utility_exportR Documentation

Exporting plots as PDF or PowerPoint graphics

Description

Exporting plots as PDF or PowerPoint graphics

Usage

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
)

Arguments

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.


masato-ogishi/plotUtility documentation built on July 27, 2023, 11:37 a.m.