getPlotDims: Get the dimensions of a ggplot Object
Description
This function retrieves the minimum and maximum x and y dimensions of a
ggplot object. Note that it is the dimension of the plot within the x and y
axis and not the dimensions of the actual output image itself. This may be
useful for numerical computations when modifying plots, but can be slow since
it builds the actual plot first.
Usage
getPlotDims(plt)
Value
A list with elements xr (a vector of xmin and xmax) and yr (a
vector of ymin and ymax).