This function will save a plot or set of plots as a PDF file in the outputDirectory of a given ArchRProject.

plotPDF(
  ...,
  name = "Plot",
  width = 6,
  height = 6,
  ArchRProj = NULL,
  addDOC = TRUE,
  useDingbats = FALSE,
  plotList = NULL
)

Arguments

...

vector of plots to be plotted (if input is a list use plotList instead)

name

The file name to be used for the output PDF file.

width

The width in inches to be used for the output PDF file.

height

The height in inches to be used for the output PDF.

ArchRProj

An ArchRProject object to be used for retrieving the desired outputDirectory which will be used to store the output plots in a subfolder called "plots".

addDOC

A boolean variable that determines whether to add the date of creation to the end of the PDF file name. This is useful for preventing overwritting of old plots.

useDingbats

A boolean variable that determines wheter to use dingbats characters for plotting points.

plotList

A list of plots to be printed to the output PDF file. Each element of plotList should be a printable plot formatted object (ggplot2, plot, heatmap, etc).

Examples


#Get Test Project
proj <- getTestProject()

#Plot UMAP
p <- plotEmbedding(proj, name = "Clusters")

#PDF
plotPDF(p, name = "UMAP-Clusters", ArchRProj = proj)