ggplot2 multiline title, different indentations

前端 未结 5 701
失恋的感觉
失恋的感觉 2021-01-01 00:25

I am generating graphs for a publication and I\'d like to be able to label the panels of a figure in ggplot itself (as opposed to exporting to publisher, etc) so that they j

5条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-01 01:07

    The easiest way is probably to use a title and a subtitle,

    ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, color = Species, shape = Species))+
      geom_jitter(size = 6.5) +
      labs(title = "A", subtitle = "The Actual Long, Normal Title of Titliness") +
      theme(plot.subtitle = element_text(hjust = 0.5))
    

提交回复
热议问题