R/x_angle.R

Defines functions x_angle

Documented in x_angle

#' Set x axis labels at any angle
#' @param x angle in degrees
#' @export
#' @examples
#' require(ggplot2)
#' mpg |> ggplot2::ggplot(aes(x=manufacturer,y=hwy)) + geom_boxplot() + x_angle(45)

x_angle <- function(x = 30) ggplot2::theme(axis.text.x = ggplot2::element_text(angle = x, hjust = 1))
bansell/tidyExt documentation built on July 12, 2024, 12:58 p.m.