rotate_axis_text: Rotate and align ggplot2 axis tick labels

rotate_axis_textR Documentation

Rotate and align ggplot2 axis tick labels

Description

Rotate and align ggplot2 axis tick labels

Usage

rotate_x_text(angle = -90, align = 0, valign = 0.25)

rotate_y_text(angle = 90, align = 0.5, valign = 0.5)

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

# library(ggplot2)
# ggplot(mpg, aes(manufacturer, cty)) + geom_boxplot() +
#     rotate_x_text() +
#     rotate_y_text()

#> A plot with X axis labels rotated 90 degrees clockwise and left-aligned to the
#> bottom edge of the plot area, and the Y axis labels rotated 90 degrees counter-
#> clockwise. All axis labels are centered on the tick marks.


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