This is a wrapper function around rot_at()
, rot_x()
, and rot_y()
that
accepts gg objects, patchwork objects, or lists of gg or patchwork objects.
Arguments to those wrapped functions can be passed through. See arguments
to rot_at()
as well as rot_x()
and rot_y()
.
library(patchwork)
data <- pmplots_data_obs()
p <- dv_pred(data)
p1 <- rot_xy(p)
p2 <- rot_xy(p, vertical = TRUE)
p3 <- rot_xy(p, axis = "y", angle = 15)
p1 + p2 + p3
#> `geom_smooth()` using formula = 'y ~ x'
#> `geom_smooth()` using formula = 'y ~ x'
#> `geom_smooth()` using formula = 'y ~ x'
rot_xy(p + dv_ipred(data))
#> `geom_smooth()` using formula = 'y ~ x'
#> `geom_smooth()` using formula = 'y ~ x'
#> `geom_smooth()` using formula = 'y ~ x'
co <- c("STUDYc", "CPc")
etas <- paste0("ETA", 1:2)
x <- eta_covariate(data, x = co, y = etas, transpose = TRUE)
pp <- rot_xy(x, at = "CPc")
pm_with(pp, STUDYc/CPc)