getBoundaries: Determine the Boundaries of a Plot in Terms of the Data Units

Description Usage Arguments Value Author(s) Examples

View source: R/getBoundaries.R

Description

Determine the Boundaries of a Plot in Terms of the Data Units

Usage

1
getBoundaries(region, units = "data", sides = 1:4)

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 either "data" or "lines".

sides

Numeric vector giving the four sides to uses as a reference if the requested units are "lines". Defaults to 1:4.

Value

A numeric vector of length four giving the coordinates of the plotting boundary, in the order of bottom, left, top, right.

Author(s)

Jasper Watson

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 

par(oma = 1:4)
plot(1:10)
print(getBoundaries('data'))
print(getBoundaries('plot'))
print(getBoundaries('figure'))
print(getBoundaries('device'))

print(getBoundaries('data', units = 'lines'))
print(getBoundaries('plot', units = 'lines'))
print(getBoundaries('figure', units = 'lines'))
print(getBoundaries('device', units = 'lines'))


## End(Not run)

precisePlacement documentation built on June 15, 2021, 9:09 a.m.