easy_rotate_labels: Easily rotate 'x' axis labels

View source: R/labs.R

easy_rotate_labelsR Documentation

Easily rotate x axis labels

Description

A shortcut to

Usage

easy_rotate_labels(
  which = c("both", "x", "y"),
  angle = 90,
  side = c("left", "middle", "right"),
  teach = FALSE
)

easy_rotate_x_labels(
  angle = 90,
  side = c("left", "middle", "right"),
  teach = FALSE
)

easy_rotate_y_labels(
  angle = 90,
  side = c("left", "middle", "right"),
  teach = FALSE
)

Arguments

which

which axis or axes to rotate, by default "both"

angle

angle through which the text should be rotated. Can also be one of "startattop" or "startatbottom" to define where the text should start.

side

horizontal justification of the text before rotation

teach

print longer equivalent ggplot2 expression?

Details

theme(axis.text.x = element_text(angle, hjust))

Value

a theme object which can be used in ggplot2 calls.

Examples

library(ggplot2)
ggplot(mtcars, aes(mpg, hp)) +
  geom_point() +
  easy_rotate_labels()

ggeasy documentation built on March 31, 2023, 10:34 p.m.