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.

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

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.

Value

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

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.

Author

Eliot McIntire and Alex Chubaty

Examples

if (FALSE) {
  dev(4)
}