rot_at: Rotate axis tick marks in a list of plots

View source: R/utils.R

rot_atR Documentation

Rotate axis tick marks in a list of plots

Description

Pass in a list of gg or patchwork objects and rotate tick marks on x or y axes.

Usage

rot_at(x, at = names(x), re = NULL, axis = c("x", "y"), ...)

Arguments

x

a named list of gg or patchwork objects.

at

a character vector of list names to rotate.

re

a regular expression for selecting names to be used for at.

axis

which axis to rotate.

...

additional arguments passed to rot_x() or rot_y().

Details

Note that all plots in the list need to be named.

See Also

rot_xy(), rot_x(), rot_y().

Examples

data <- pmplots_data_id()

co <- c("STUDYc", "CPc", "RF")
etas <- paste0("ETA", 1:3)

x <- eta_cat(data, x = co, y = etas)
names(x)

x <- rot_at(x, at = "ETA1vRF", angle = 35)
x$ETA1vRF

x <- rot_at(x, re = "RF", vertical = TRUE)
x$ETA2vRF
x$ETA3vRF


metrumresearchgroup/pmplots documentation built on Oct. 15, 2024, noon