rotate_facet_text: Rotate and align ggplot2 facet labels

rotate_facet_textR Documentation

Rotate and align ggplot2 facet labels

Description

Rotate and align ggplot2 facet labels

Usage

rotate_x_facet_text(angle = 45, align = 0, valign = 0.25)

rotate_y_facet_text(angle = 45, align = 0, valign = 0.25)

Arguments

angle

(Numeric) Rotation angle. -90 rotates 90 degrees clockwise, 90 rotates 90 degrees anti-clockwise.

align

(Numeric) Horizontal alignment. 0 left-aligns, 1 right-aligns, and 0.5 centers.

valign

(Numeric) Vertical alignment. 0 top-aligns, 1 bottom-aligns, and 0.5 centers.

Value

A ggplot2 theme object.

Examples

# plot <- ggplot(mpg, aes(cty, hwy)) + geom_point() + facet_grid(year ~ fl)
# plot +
#     rotate_x_facet_text(angle = 45, align = 0.5) +
#     rotate_y_facet_text(angle = 0, valign = 0.5)


DesiQuintans/desiderata documentation built on April 9, 2023, 5:43 a.m.