答案 0 :(得分:1)
使用vjust
选项调整文字位置(p2
中的主题是您需要的。)
library(ggplot2)
p1 <- qplot(rownames(head(mtcars)), 1) +
ggtitle("vjust = 0") +
theme(axis.text.x = element_text(angle = 90, vjust = 0))
p2 <- qplot(rownames(head(mtcars)), 1) +
ggtitle("vjust = 0.3") +
theme(axis.text.x = element_text(angle = 90, vjust = 0.3))
gridExtra::grid.arrange(p1, p2, ncol = 2)