Cowplot made ggplot2 theme disappear / How to see current ggplot2 theme, and restore the default?

后端 未结 1 1500
一整个雨季
一整个雨季 2020-11-28 15:49

I recently installed the cowplot package. However, after doing this I noticed that my ggplots are missing their background and grid lines of theme_grey()<

相关标签:
1条回答
  • 2020-11-28 16:31

    Note: this is longer an issue in current releases of cowplot, where the default theme is not changed. Original answer below:


    You can use theme_get() to see the current "default" theme.

    You can use theme_set() to change the "default" theme.

    Theme settings do not carry over sessions.

    Usually, your default will be theme_grey, but cowplot feels it's necessary to change that into theme_cowplot. I really wish it didn't.

    You can either use :: notation to completely avoid this, or you can load the package as:

    library(cowplot)
    theme_set(theme_grey())
    
    0 讨论(0)
提交回复
热议问题