alignpatch {ggalign} | R Documentation |
Building alignpatches
object
Description
Prepare plots to be aligned with align_plots
-
alignpatch
: Prepare a plot object to be aligned, the output must implement properpatch_gtable
method.
Extend object to be aligned with align_plots
-
patch_table
: Convert the plot into a gtable. -
patch_align
: Build a standard gtable object and set the panel width and height.
Usage
alignpatch(x)
patch_gtable(patch, guides)
## S3 method for class 'ggplot'
patch_gtable(patch, guides)
## S3 method for class 'alignpatches'
patch_gtable(patch, guides)
## S3 method for class 'wrapped_plot'
patch_gtable(patch, guides)
## S3 method for class 'patch'
patch_gtable(patch, guides)
## S3 method for class 'wrapped_patch'
patch_gtable(patch, guides)
patch_align(gt, guides, panel_width, panel_height)
Arguments
x |
A plot object to be prepared for alignment. |
patch |
A patch to be aligned. |
guides |
Input guides argument to |
gt |
A gtable object from |
panel_width , panel_height |
Size of the panel, if the size is |
Details
ggalign
has implement patch_gtable
method for following objects:
Value
-
alignpatch
: An object that implementspatch_gtable
method.
-
patch_gtable
: A gtable object.
-
patch_align
: A list with following elements:-
gt
: A standard gtable object -
width
/height
: the panel width and height. -
respect
: A boolean value indicates whether to fix this panel area.
-
Examples
alignpatch(ggplot())
patch_gtable(ggplot())