Description Usage Arguments Examples
Rotate the x-axis text (tick mark labels).
rotate_x_text
(): Rotate x axis text.
rotate_y_text
(): Rotate y axis text.
1 2 3 | rotate_x_text(angle = 90, hjust = NULL, vjust = NULL, ...)
rotate_y_text(angle = 90, hjust = NULL, vjust = NULL, ...)
|
angle |
numeric value specifying the rotation angle. Default is 90 for vertical x-axis text. |
hjust |
horizontal justification (in [0, 1]). |
vjust |
vertical justification (in [0, 1]). |
... |
other arguments to pass to the function
|
1 2 3 4 5 6 7 8 9 10 11 12 | # Load data
data("ToothGrowth")
df <- ToothGrowth
# Basic plot
p <- ggboxplot(df, x = "dose", y = "len")
p
# Vertical x axis text
p + rotate_x_text()
# Set rotation angle to 45
p + rotate_x_text(45)
p + rotate_y_text(45)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.