【发布时间】:2019-06-19 08:02:16
【问题描述】:
我有一个带有相当宽的 y 轴标签的图,所以我想将标题调整到左侧,使其与标签而不是轴齐平(如 this question)但扭曲的是我有一个多行标题。我一直在使用 hjust,但它以不同的方式调整两条线。 例如
ggplot(mtcars,aes(x=wt,y=mpg))+
geom_point()+
ggtitle("Figure: My long and winding title\nthat goes on and on and on") +
ylab("My long label") +
theme_bw() +
theme(plot.title = element_text(size=16, hjust=-.33, color="black", face="bold")) +
theme(axis.title.y = element_text(angle = 0, hjust = 1))
【问题讨论】: