x90: Rotate x axis tick labels

View source: R/4_internal_functions.R

x90R Documentation

Rotate x axis tick labels

Description

Convenience functions to rotate x axis tick labels in ggplot plots:
x30() rotates in 30 degrees.
x90() rotates in 90 degrees.

Usage

x90()

x30()

Details

These functions correct ggplot2 theme elements and may not respond if new theme is applied after e.g. x30() is apllied. I.e. INCORRECT:
qplot(mpg, wt, data = mtcars) + x30() + theme_bw().
CORRECT:

qplot(mpg, wt, data = mtcars) + theme_bw() + x30().

Examples

library(ggplot2)
library(spHelper)

qplot(mpg, wt, data = mtcars) + x30()
qplot(mpg, wt, data = mtcars) + x90()


GegznaV/spHelper documentation built on April 16, 2023, 1:42 p.m.