Change interlinear space in ggplot title?

前端 未结 2 2040
长发绾君心
长发绾君心 2021-02-20 12:37

If I use \\n with labs(title=\"whatever \\n comes after this\") I end up with quite a big space between the lines. Is there a way to influence it? (I m

2条回答
  •  遇见更好的自我
    2021-02-20 13:07

    you can do something like this ( option lineheight to modify line spacing)

      p <- qplot(mpg, wt, data = mtcars)
      p <- p + ggtitle("whatever \n comes after this") + 
      theme(plot.title = element_text(lineheight=.1))
      p
    

提交回复
热议问题