Rotate axis text

rot_x(angle = 30, hjust = 1, vjust = NULL, vertical = FALSE, ...)

rot_y(angle = 30, hjust = 1, vjust = NULL, ...)

Arguments

angle

passed to ggplot2::element_text

hjust

passed to ggplot2::element_text

vjust

passed to ggplot2::element_text

vertical

if TRUE, then x-axis tick labels are rotated 90 degrees with vjust set to 0.5 and hjust set to 0; when vertical is set to TRUE, then hjust can be passed as character string that must match either top (then hjust is set to 1) or bottom (then hjust is set to 0

...

pased to ggplot2::element_text

Details

If x-axis tick labels do not have enough space, consider using vert = TRUE. By default, the tick labels will be justified up to the x-axis line. Use hjust = "b" or hjust = "bottom" (with vert = TRUE) to justify the axis labels toward the bottom margin of the plot.

Examples

data <- pmplots_data_obs() dv_pred(data) + rot_x()
#> `geom_smooth()` using formula 'y ~ x'
if (FALSE) { cwres_cat(data, x = "CPc") + rot_x(vert = TRUE) cwres_cat(data, x = "CPc") + rot_x(vert = TRUE, hjust = "b") }