ggplot2主题选项列表? [英] List of ggplot2 theme options?

查看:133
本文介绍了ggplot2主题选项列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

经过一番研究,我找到了防止无意义的传说显示的方法。

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

我在哪里可以找到所有可用的主题选项及其默认值为ggplot2?

解决方案

能找到是在 ggplot2 wiki 。我认为大部分选项都是用范例来说明的。



更新
如果您想查看选项在当前绘图中使用时,可以使用 plot_theme(x)查看当前为名为x的绘图设置的所有选项。它不是一个全面的列表,但是如果你想改变一个轴标签的字体大小,它应该会有帮助。



更新2
随着版本0.9.0的过渡,值得注意的是内置的文档已经得到了显着改善,并且转换指南从0.8.9到0.9.0也值得一试。

更新3
现在有一个ggplot2文档网站。请查看主题的文档获取完整列表。另外,?theme 在0.9.3中有一个相当完整的列表。



Update 4 strong>
现在有一个ggthemes包,它有一些不错的主题和可供选择的比例尺。它可以让你不必创建自己的。查看他们的 github 页面获取更多信息。


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

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

Where can I find all of the available theme options and their default values for ggplot2?

解决方案

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.

这篇关于ggplot2主题选项列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆