savePlot: Helper function for writing plots to disc

View source: R/coverage_plots.R

savePlotR Documentation

Helper function for writing plots to disc

Description

Helper function for writing plots to disc

Usage

savePlot(
  plot,
  output = NULL,
  width = 200,
  height = 150,
  plot.ext = ".pdf",
  dpi = 300,
  limitsize = FALSE
)

Arguments

plot

the ggplot to save

output

character string (NULL), if set, saves the plot as pdf or png to path given. If no format is given, is save as specified by plot.ext argument.

width

width of output in mm

height

height of output in mm

plot.ext

character, default: ".pdf". Alternatives: ".png" or ".jpg".

dpi

(300) dpi of plot

limitsize

logical, default FALSE. If TRUE, activate ggplot max size restriction.

Value

a ggplot object of the coverage plot, NULL if output is set, then the plot will only be saved to location.

See Also

Other coveragePlot: coverageHeatMap(), pSitePlot(), windowCoveragePlot()


Roleren/ORFik documentation built on Dec. 18, 2024, 11:39 p.m.