Learn R Programming

precisePlacement (version 0.2.0)

getRange: Determine the Width and Height of a Plot

Description

Determine the Width and Height of a Plot

Usage

getRange(region, units)

Value

Numeric vector of length two giving the range of the plotting region, in the order of x-axis, y-axis.

Arguments

region

The region of the plot to use for defining the boundaries. Must be one of "device", "figure", "plot", or "data".

units

Character string giving the units in which to define the range. Must be one of "in", "px", "data", or "lines".

Author

Jasper Watson

Examples

Run this code
if (FALSE) {

plot(1:10)
print(getRange('data', 'in'))
print(getRange('plot', 'px'))
print(getRange('figure', 'data'))
print(getRange('device', 'lines'))

}

Run the code above in your browser using DataLab