gg_SavePlotWithOneFixedDim: Save a ggplot2 plot to a file, specifying the size of one...

View source: R/gg_SavePlotWithOneFixedDim.R

gg_SavePlotWithOneFixedDimR Documentation

Save a ggplot2 plot to a file, specifying the size of one dimension

Description

Function to save a ggplot2 plot to a file, specifying the size of one dimension.

Usage

gg_SavePlotWithOneFixedDim(
  filename,
  plot = last_plot(),
  fxdDim,
  fitWidth = TRUE,
  units = "in",
  device = NULL,
  dpi = 200
)

Arguments

filename
  • file name for output

plot
  • ggplot2 plot object to save (defaults to last plot)

fxdDim
  • value for the fixed dimension

fitWidth
  • flag indicating fixed dimension is width (default is TRUE)

units
  • character string with units for the fixed dimension

device
  • graphics device to print to

dpi
  • resolution (default=200 dpi)

Details

Uses gg_FixOnePlotDim to determine the value of the missing plot dimension.


wStockhausen/wtsUtilities documentation built on March 16, 2024, 10:38 a.m.