dev.size

Find Size of Device Surface

Find the dimensions of the device surface of the current device.

Keywords
dplot
Usage
dev.size(units = c("in", "cm", "px"))
Arguments
units

the units in which to return the value -- inches, cm, or pixels (device units).

Value

A two-element numeric vector giving width and height of the current device; a new device is opened if there is none, similarly to dev.new().

See Also

The size information in inches can be obtained by par("din"), but this provides a way to access it independent of the graphics sub-system in use. Note that par("din") is only updated when a new plot is started, whereas dev.size tracks the size as an on-screen device is resized.

Aliases
  • dev.size
Examples
library(grDevices) # NOT RUN { dev.size("cm") # }
Documentation reproduced from package grDevices, version 3.6.1, License: Part of R 3.6.1

Community examples

Looks like there are no examples yet.