Plot: plot figure and save the figure grob object to a file at the...

View source: R/plotting.R

PlotR Documentation

plot figure and save the figure grob object to a file at the same time

Description

This is most useful for working with IRkernl in Jupyter notebooks

Usage

Plot(
  p,
  file = NULL,
  path = NULL,
  suffix = "",
  saveObj = TRUE,
  saveImg = FALSE,
  width = NA,
  height = NA,
  ...
)

Arguments

p

Plot object (ggplot2, base, etc)

file

File name to write. If NULL, the name will be based on the md5sum of the object, so the name will change if the object changes.

path

Path to write to. If NULL, the path will be .figures/.

suffix

File name suffix (eg., '.png')

saveObj

Write the Robj to a file?

saveImg

Write the image to a file?

width

Figure width. If NA, uses global options

height

Figure height. If NA, uses global options


leylabmpi/LeyLabRMisc documentation built on Nov. 3, 2022, 3:45 p.m.