rotate_axis_text: Rotate axis text of a ggplot

Description Usage Arguments Examples

View source: R/plotting.R

Description

Adapted from http://stackoverflow.com/a/36979201/3498910.

Usage

1
2
rotate_axis_text(angle, position = "x", hjust = "auto",
  vjust = "auto")

Arguments

angle

Angle to apply, in degrees

position

One of "x" or "y". Defaults to "x".

hjust, vjust

Horizontal and vertical adjustement.

Examples

1
2
3
4
5
library("ggplot2")
df <- data.frame(x=.5, y=.5)

ggplot(df, aes(x=x, y=y)) + geom_point() +
    rotate_axis_text(60)

antoine-sachet/customFunctions documentation built on Sept. 25, 2020, 8:56 p.m.