这看起来有点老套,但是
paste0
与使用“true”plotmath相比,使用“\n”也有点麻烦,所以也许它会有用。用前导空格填充每条线,然后使用hjust=0
# change the y value to --->
y = paste0( " ","Box and whiskers: ", quo_name(y_expr),
"\n"," ","Granular means: ", quo_name(gran_expr),
"\n"," ","Coarse means: ", quo_name(coarse_expr), " ")
flights %>%
box_box_box_plot(arr_delay_log, carrier, quarter, day)+
ggtitle("Quarter 2 typically has the worst delays")+theme(axis.title.y=element_text(hjust=0))