Learn R Programming

quickPlot (version 1.0.2)

dev: Specify where to plot

Description

Switch to an existing plot device, or if not already open, launch a new graphics device based on operating system used. On Windows and macOS, if x is not provided, this will open or switch to the first non-RStudio device, which is much faster than the png-based RStudio plot device. Currently, this will not open anything new.

Usage

dev(x, ..., verbose = getOption("quickPlot.verbose"))

Value

Opens a new plot device on the screen. Invisibly returns the device number selected.

Arguments

x

The number of a plot device. If missing, will open a new non-RStudio plotting device

...

Additional arguments passed to newPlot().

verbose

Numeric or logical. If TRUE or >0, then messages will be shown. If FALSE or 0, most messages will be suppressed.

Author

Eliot McIntire and Alex Chubaty

Details

For example, dev(6) switches the active plot device to device 6. If it does not exist, it opens it. If devices 1-5 don't exist they will be opened too.

Examples

Run this code
if (FALSE) {
  dev(4)
}

Run the code above in your browser using DataLab