Disable cowplot default for ggplots

后端 未结 2 1838
萌比男神i
萌比男神i 2021-02-19 19:00

The ggplot2 add-on package, cowplot, has a nice function for plotting multiple plots called plot_grid(). Here\'s plot_grid()

2条回答
  •  日久生厌
    2021-02-19 19:46

    Just call theme_set(theme_gray()) beforehand:

    theme_set(theme_gray())
    plot_grid(plot_a, plot_b, labels = c("A", "B"))
    

    Then, if you want to go crazy with themes, you could install ggthemes and simply replace theme_gray() with any theme you choose, or roll your own. Also see this vignette for styling individual elements.

提交回复
热议问题