Fix the width/height of panels in a single plot object.
Usage
panel_fix_single(
x,
panel_index = NULL,
respect = NULL,
width = NULL,
height = NULL,
margin = 1,
units = "in",
raster = FALSE,
dpi = 300,
BPPARAM = BiocParallel::SerialParam(),
return_grob = FALSE,
bg_color = "white",
save = NULL,
verbose = TRUE
)Arguments
- x
A ggplot object, a grob object, or a combined plot made by patchwork or cowplot package.
- panel_index
Specify the panel to be fixed. If NULL, will fix all panels.
- respect
If a logical, this indicates whether row heights and column widths should respect each other.
- width
The width of the panel.
- height
The height of the panel.
- margin
Margins around the plot.
- units
The units in which
height,widthandmarginare given. Can bemm,cm,in, etc. Seeunit.- raster
Whether to rasterize the panel.
- dpi
Plot resolution.
- BPPARAM
An
BiocParallelParaminstance determining the parallel back-end to be used during building the object made by patchwork package.- return_grob
If
TRUEthen return a grob object instead of a wrappedpatchworkobject.- bg_color
Plot background color.
- save
NULL or the file name used to save the plot.
- verbose
Whether to print messages.