List of ggplot2 theme options?

后端 未结 9 1718
清歌不尽
清歌不尽 2020-11-30 18:08

After some research I found the way to prevent an uninformative legend from displaying

... + theme(legend.position = \"none\")

Where can I

相关标签:
9条回答
  • 2020-11-30 18:49

    Theme templates:

    https://github.com/jrnold/ggthemes

    like "The economist", "Stata", "tufte" and more..

    I know the answer is not exactly what was asked, but it was what I was looking for when I found this question, so others might too.

    0 讨论(0)
  • 2020-11-30 18:54

    The closest thing to a comprehensive list that I have been able to find is in the ggplot2 wiki on github. I think that most of the options are covered there with examples.

    Update If you would like to see the options that are in use on a current plot, you can use plot_theme(x) to see all of the options that are currently set for the plot named x. It will not be a comprehensive list, but should help if you want to change something like the font size for an axis label.

    Update 2 With the transition to version 0.9.0 it's worth noting that the built in documentation has been dramatically improved, and the transition guide from 0.8.9 to 0.9.0 is also worth checking out.

    Update 3 There is now a ggplot2 documentation website. Look at the documentation for theme for a complete list. Also, ?theme has a pretty complete list as of 0.9.3.

    Update 4 There is now a ggthemes package that has some nice themes and scales to choose from. It might save you from having to create your own. See their github page for more information.

    0 讨论(0)
  • 2020-11-30 18:57

    Best list I've found for version 0.9.2.1 is here.

    0 讨论(0)
  • 2020-11-30 18:57

    I made this quick reference for any theme or tasks you might look for. For a more general understanding, this ggplot2 tutorial should help.

    0 讨论(0)
  • 2020-11-30 18:59

    Entering in

    theme_get()
    

    will show a comprehensive listing of theme values and options. You can then follow the syntax to modify these attributes in opts().

    0 讨论(0)
  • 2020-11-30 19:00

    ?opts although, this does not display how to finetune its arguments, therefore it's better to check the options given above. If you can get a copy of the ggplot2 reference manual, it will help you a lot.

    0 讨论(0)
提交回复
热议问题