Skip to contents

Layout Class

A Layout object defines how to place the plots.

heatmap_layout() stable
Arrange Plots in a Heatmap
stack_layout() experimental
Put plots horizontally or vertically
quad_layout() experimental
Arrange Plots in the Quad-Side of a main plot
quad_free() quad_alignh() quad_alignv() quad_alignb() experimental
Arrange Plots in the Quad-Side of a main plot
stack_align() stack_alignv() stack_alignh() stack_free() stack_freev() stack_freeh() experimental
Arrange Plots Horizontally or Vertically
ggoncoplot() experimental
Create OncoPrint Visualizations from Genetic Alteration Data

Layout Building

All plots begin with a call to ggheatmap()/quad_layout() or ggstack(), supplying default data. You then reorder the observations, or split the observations into groups, and add plots, layers, scales, coords with +. Use quad_switch()/hmanno() or stack_switch() to switch the active context. To save a plot to disk, use ggsave().

Ops(<QuadLayout>,<ANY>) Ops(<StackLayout>,<ANY>) experimental
Layout operator
quad_switch() hmanno() stable
Determine the Active Context of Quad-Layout
quad_active() quad_anno() anno_top() anno_left() anno_bottom() anno_right() stable
Determine the Active Context of Quad-Layout
quad_init() experimental
Initialize Quad-Layout Annotation
with_quad() experimental
Modify operated Context in quad_layout()
stack_switch() stack_active() stable
Determine the active context of stack layout
active() experimental
Plot Adding Context Settings
theme_ggalign()
Theme for Layout Plots

Layout Customization

Fine-tune the arrangement of plots by reordering or splitting axes into separate panels. These functions allow for more detailed customization of plot layouts.

align_dendro() stable
Reorder or Group observations based on hierarchical clustering
align_group() stable
Group and align observations based on a group vector
align_kmeans() stable
Split observations by k-means clustering groups.
align_order() stable
Order observations based on weights
align_reorder()
Reorders layout observations based on specific statistics.

Layout Plots

This section covers essential functions to add individual plots to the layout, ensuring they align and interact correctly within the defined structure.

align_gg() stable
Create ggplot object
free_gg() experimental
Add ggplot to layout

Plot options

This section covers essential functions to add individual plots to the layout, ensuring they align and interact correctly within the defined structure.

plot_align() experimental
Align Specifications in the Layout
plot_data() experimental
Plot data Specifications
plot_theme() experimental
Plot default theme

Plot composer

This section outlines essential functions for composing plots into a grid, intended for internal use. The core code is derived from the patchwork package, with the hope of eventually integrating and merging these functions into the patchwork project.

align_plots()
Arrange multiple plots into a grid
patch_titles()
Add patch titles to plot borders
free_align() free_border() free_guide() free_lab() free_space() free_vp()
Free from alignment
area()
Define the plotting areas in align_plots
inset()
Create a ggplot inset
ggwrap()
Wrap Arbitrary Graphics to ggplot
layout_design()
Define the grid to compose plots in
layout_title()
Annotate the whole layout
layout_annotation()
Modify components of the layout

Extending Plot Composer

Extending capabilities to align graphics with align_plots().

alignpatch()
Prepare plots to be aligned with align_plots
patch()
Convert Object into a Grob

helpers

A handful of helpers

geom_pie()
Pie charts
geom_subrect() geom_subtile()
Subdivide Rectangles
theme_no_axes()
Remove axis elements
layer_order() experimental
Change the layer adding order
geom_draw()
Layer with customized draw function
scale_draw_manual()
Scale for draw aesthetic
draw_key_draw()
Key glyphs for legends
ggalignGrob()
Generate a plot grob.
ggalign_attr() ggalign_attr_set() ggalign_attr_get()
Get Data from the Attached Attribute in the Rendering Process
ggalign_stat()
Get the statistics from the layout
fortify_data_frame()
Build a data frame
fortify_matrix()
Build a Matrix
fortify_stack()
Build data for the stack layout
align() experimental
Create a New align Object
hclust2()
Generate Tree Structures with Hierarchical Clustering
order2()
Ordering Permutation
dendrogram_data()
Dengrogram x and y coordinates
is_layout() is_quad_layout() is_stack_layout() is_heatmap_layout() is_ggheatmap()
Reports whether x is layout object
read_example()
Read Example Data