This function saves a plot to a PDF file. It can create a new PDF or append the plot to an existing file. If the file already exists and overwrite is set to FALSE, a new uniquely named file is created.
Arguments
- file
A character string specifying the file path for the PDF.
- plot_code
A language object representing the plot code to be executed. Typically, use
quoteto wrap the plot code.- overwrite
Logical. If
TRUE, overwrites the existing file. Default isFALSE.- append
Logical. If
TRUE, appends the new plot to the existing file by combining the old and new PDFs. Default isTRUE.- ...
Additional arguments passed to the
pdffunction, such aswidthorheight.