View source: R/gg_FixOnePlotDim.R
gg_FixOnePlotDim | R Documentation |
Function to calculate the missing dimension of a ggplot2 object given the other dimension.
gg_FixOnePlotDim(
ggobj,
fxdDim,
fitWidth = TRUE,
units = "in",
verbose = FALSE,
...
)
ggobj |
|
fxdDim |
|
fitWidth |
|
units |
|
verbose |
|
... |
|
Based on code from the DeLuciatoR::get_dims function.
This function calculates the total height/width based on setting the total width/height (the latter determines the size of a "null" unit for expandable grobs). Another approach is taken in gg_GetPlotDims, which fixes the size of null units, then calculates the resulting height and width.
a 2-element list (height, width) with the plot dimensions
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.