Learn R Programming

ggalign (version 1.0.1)

layout_title: Annotate the whole layout

Description

Annotate the whole layout

Usage

layout_title(title = waiver(), subtitle = waiver(), caption = waiver())

Value

A layout_title object.

Arguments

title

The text for the title.

subtitle

The text for the subtitle for the plot which will be displayed below the title.

caption

The text for the caption which will be displayed in the bottom-right of the plot by default.

Examples

Run this code
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, p2, p3) +
    layout_title(title = "I'm title")

Run the code above in your browser using DataLab