cyto_plot_save: Save High Resolution cyto_plot Images

View source: R/cyto_plot-helpers.R

cyto_plot_saveR Documentation

Save High Resolution cyto_plot Images

Description

Save High Resolution cyto_plot Images

Usage

cyto_plot_save(
  save_as,
  width = 7,
  height = 7,
  units = "in",
  res = 300,
  multiple = FALSE,
  layout = NULL,
  ...
)

Arguments

save_as

name of the file to which the plot should be saved (including the file extension). Supported file formats include png, tiff, jpeg, svg and pdf.

width

numeric indicating the width of exported plot in units, set to 7 by default for image with width of 7 inches.

height

numeric indicating the height of the exported plot in units, set to 7 by default for image with height of 7 inches.

units

units to be used to set plot size, can be either pixels (px), inches (inches), centimetres (cm) or millimetres (mm). Set to "in" by default. Units cannot be altered for svg and pdf graphics devices.

res

resolution in ppi, set to 300 by default.

multiple

logical indicating whether multiple pages should be saved to separate numbered files, set to TRUE by default.

layout

a vector or matrix defining the custom layout of the plot to be created using 'cyto_plot_layout', set to NULL by default to use standard 'cyto_plot' layout. Custom layouts are required when making multiple 'cyto_plot' calls in the same image.

...

additional arguments for the appropriate png(), tiff(), jpeg(), svg() or pdf graphics devices.

Author(s)

Dillon Hammill (Dillon.Hammill@anu.edu.au)

See Also

cairo

png

Examples

## Not run: 
library(CytoExploreRData)

# Load samples into GatingSet
fs <- Activation
gs <- GatingSet(fs)

# Apply compensation
gs <- cyto_compensate(gs)

# Transform fluorescent channels
gs <- cyto_transform(gs)

# Apply gatingTemplate
cyto_gatingTemplate_apply(gs, Activation_gatingTemplate)

# Save png image of gating scheme after plotting
cyto_plot_save("Gating-Scheme.png",
  width = 20,
  height = 16
)
cyto_plot_gating_scheme(gs[[1]])

# Save multiple pages to the same pdf file
cyto_plot_save("CD4-T-Cells.pdf",
  height = 8,
  width = 16,
  multiple = TRUE
)
cyto_plot(gs,
  parent = "CD4 T Cells",
  alias = "",
  channels = c("Alexa Fluor 647-A", "7-AAD-A"),
  layout = c(1, 2)
)

## End(Not run)

DillonHammill/CytoExploreR documentation built on March 2, 2023, 7:34 a.m.