rotate_facet_text | R Documentation |
Rotate and align ggplot2 facet labels
rotate_x_facet_text(angle = 45, align = 0, valign = 0.25)
rotate_y_facet_text(angle = 45, align = 0, valign = 0.25)
angle |
(Numeric) Rotation angle. |
align |
(Numeric) Horizontal alignment. |
valign |
(Numeric) Vertical alignment. |
A ggplot2 theme object.
# plot <- ggplot(mpg, aes(cty, hwy)) + geom_point() + facet_grid(year ~ fl)
# plot +
# rotate_x_facet_text(angle = 45, align = 0.5) +
# rotate_y_facet_text(angle = 0, valign = 0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.