layout_annotation {ggalign}R Documentation

Modify components of the layout

Description

Usage

layout_annotation(theme = waiver(), ...)

Arguments

theme

A theme() object used to customize various elements of the plot, including guides, title, subtitle, caption, margins, panel.border, and background. By default, the theme will inherit from the parent layout.

...

These dots are for future extensions and must be empty.

Details

Examples

p1 <- ggplot(mtcars) +
    geom_point(aes(mpg, disp))
p2 <- ggplot(mtcars) +
    geom_boxplot(aes(gear, disp, group = gear))
p3 <- ggplot(mtcars) +
    geom_bar(aes(gear)) +
    facet_wrap(~cyl)
align_plots(
    p1 + theme(plot.background = element_blank()),
    p2 + theme(plot.background = element_blank()),
    p3 + theme(plot.background = element_blank())
) +
    layout_annotation(
        theme = theme(plot.background = element_rect(fill = "red"))
    )

[Package ggalign version 1.0.2 Index]