R color palettes for many data classes

后端 未结 7 1465
广开言路
广开言路 2020-12-02 19:17

Are there any good packages for colour palettes in R that can handle many data classes? I have 16 sequential data classes. I tried RColorBrewer but it has a max of 9 data cl

7条回答
  •  鱼传尺愫
    2020-12-02 20:09

    After much experimentation, I came up with the 25 colors that are mostly distinguishable. This is intended for classed data, not continuous/sequential data.

    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)
    

提交回复
热议问题