powered by
Determine the Width and Height of a Plot
getRange(region, units)
The region of the plot to use for defining the boundaries. Must be one of "device", "figure", "plot", or "data".
Character string giving the units in which to define the range. Must be one of "in", "px", "data", or "lines".
Numeric vector of length two giving the range of the plotting region, in the order of x-axis, y-axis.
# NOT RUN { plot(1:10) print(getRange('data', 'in')) print(getRange('plot', 'px')) print(getRange('figure', 'data')) print(getRange('device', 'lines')) # } # NOT RUN { # }
Run the code above in your browser using DataLab