R 中是否存在可用于为图形着色的颜色模式?

发布于 2024-10-07 04:35:56 字数 227 浏览 1 评论 0原文

我想知道在 R 中是否有一个现有的包可以为图形内的集合着色,或者一个包可以生成不接近的颜色列表, 因为我有一个包含许多簇的图表,我想要着色,但我不希望颜色接近。 我在这里找到了一个很好的答案,但我想知道是否有一个现有的包

I am wondering if in R there is a per-existing package that can colorate sets inside graph or a package that can generate a list of colors that are not close,
Because I have a graph that have many clusters and I want to color but I don't want to colors to be close.
I have found a nice answer here but I am wondering if there is a per-existing package for

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你的往事 2024-10-14 04:35:56

您可能还想查看包 RColorBrewer 用于其他内置调色板。但是,如果您需要大量颜色,则可能会遇到问题。 CrossValidated 上有一篇很好的文章,它解决了大 n 问题并提供了也有一些不错的解决方案。具体来说,根据一些大的分组来划分你的情节是否有意义?您需要一次绘制所有项目吗? ggplot2 可以根据数据中的列轻松facet。我确信基础图形和晶格中有等效的功能,但我对它们不太熟悉。

You may also want to check out the package RColorBrewer for other built in color palettes. However, you may run into issues if you need large numbers of colours. There is a nice post on CrossValidated which addresses the large n issue and offers a few nice solutions as well. Specifically, would it make sense to facet your plot based on some large groupings? Do you need to plot all of the items at once? ggplot2 makes it easy to facet based on a column in your data. I'm sure there are equivalent functions in base graphics and lattice, but I'm not as familiar with them.

多孤肩上扛 2024-10-14 04:35:56

请参阅帮助页面 (?rainbow)。它们是默认安装的 grDevices 包的一部分。

See the functions rainbow, heat.colors, terrain.colors etc, described in the help pages (?rainbow). These are part of the grDevices package, which is installed by default.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文