gpt4 book ai didi

许多数据类的 R 调色板

转载 作者:行者123 更新时间:2023-12-04 02:32:43 31 4
gpt4 key购买 nike

R中是否有可以处理许多数据类的调色板的好包?我有 16 个连续数据类。我试过 RColorBrewer 但它最多有 9 个数据类,我也试过 Rainbow() 但它对顺序数据没有吸引力。谢谢

最佳答案

经过大量实验,我想出了 25 种最容易区分的颜色。这适用于分类数据,而不是连续/顺序数据。

c25 <- c(
"dodgerblue2", "#E31A1C", # red
"green4",
"#6A3D9A", # purple
"#FF7F00", # orange
"black", "gold1",
"skyblue2", "#FB9A99", # lt pink
"palegreen2",
"#CAB2D6", # lt purple
"#FDBF6F", # lt orange
"gray70", "khaki2",
"maroon", "orchid1", "deeppink1", "blue1", "steelblue4",
"darkturquoise", "green1", "yellow4", "yellow3",
"darkorange4", "brown"
)
pie(rep(1, 25), col = c25)

关于许多数据类的 R 调色板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9563711/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com