Learn R Programming

ggalign (version 1.2.0)

standardized_gtable: Standardized gtable Representation

Description

The standardized gtable representation ensures that all plots share a consistent row–column structure, facilitating flexible composition, patch insertion, and alignment across multiple plots.

This layout provides a fixed-size gtable grid for predictable positioning of plot components such as titles, axes, legends, captions, and margins. It is used internally for layout normalization and patch-based alignment.

Arguments

Row structure (top -> bottom)

IndexComponentDescription
1margin-topExternal top spacing
2tag-topTop tag (e.g., "A", "B")
3titleMain title
4subtitleSubtitle
5guide-box-topLegend box at top
6legend.box.spacingSpace between legend and main area
7patch-title-topTop patch title
8xlab-topTop x-axis label (rare)
9axis-topTop axis ticks and labels
10strip-topTop strip (facet label)
11panelMain plotting panel
12strip-bottomBottom strip (facet label)
13axis-bottomBottom axis ticks and labels
14xlab-bottomBottom x-axis label
15patch-title-bottomTop patch title
16legend.box.spacingSpace before bottom legend box
17guide-box-bottomBottom legend box
18captionCaption or footnote text
19tag-bottomBottom tag (optional)
20margin-bottomExternal bottom spacing

Column structure (left -> right)

IndexComponentDescription
1margin-leftExternal left spacing
2tag-leftOptional side tag
3guide-box-leftLeft legend box
4legend.box.spacingSpace between legend and panel
5patch-title-leftLeft patch title
6ylab-leftLeft y-axis label
7axis-leftLeft axis ticks and labels
8strip-leftLeft strip (facet label)
9panelMain panel area
10strip-rightRight strip (facet label)
11axis-rightRight axis ticks and labels
12ylab-rightRight y-axis label
13patch-title-rightRight patch title
14legend.box.spacingSpace before right legend box
15guide-box-rightRight legend box
16tag-rightOptional tag on right side
17margin-rightExternal right spacing