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

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

问题描述

经过一些研究,我找到了防止显示无信息图例的方法

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

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

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

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

推荐答案

我能找到的最接近综合列表的是 ggplot2 wiki 在 github 上.我认为大多数选项都包含在示例中.

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.

更新如果您想查看当前绘图中使用的选项,可以使用 plot_theme(x) 查看当前为名为 x 的绘图设置的所有选项.这不是一个完整的列表,但如果您想更改轴标签的字体大小等内容,应该会有所帮助.

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.

更新 2随着向 0.9.0 版本的过渡,值得注意的是内置文档已得到显着改进,并且 从 0.8.9 到 0.9.0 的过渡指南也值得一看.

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.

更新 3现在有一个 ggplot2 文档网站.查看 theme 的文档以获取完整列表.此外,?theme 从 0.9.3 开始有一个非常完整的列表.

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.

更新 4现在有一个 ggthemes 包,其中有一些不错的主题和比例可供选择.它可能使您不必创建自己的.查看他们的 github 页面了解更多信息.

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天全站免登陆