rotate_axis_text | R Documentation |
Rotate and align ggplot2 axis tick labels
rotate_x_text(angle = -90, align = 0, valign = 0.25)
rotate_y_text(angle = 90, align = 0.5, valign = 0.5)
angle |
(Numeric) Rotation angle. |
align |
(Numeric) Horizontal alignment. |
valign |
(Numeric) Vertical alignment. |
A ggplot2 theme object.
# library(ggplot2)
# ggplot(mpg, aes(manufacturer, cty)) + geom_boxplot() +
# rotate_x_text() +
# rotate_y_text()
#> A plot with X axis labels rotated 90 degrees clockwise and left-aligned to the
#> bottom edge of the plot area, and the Y axis labels rotated 90 degrees counter-
#> clockwise. All axis labels are centered on the tick marks.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.