0

I needed to plot cumulative distribution curves for 15 different groups but the default color setting generated some curves with visually similar colors, which caused some trouble for presentation, especially when the two curves have similar cumulative distributions.

My current approach is to generate one plot first and then based on the plot assign colors on specific curves to visually separate them.

I was wondering if there are other easier approaches to plot a large number (>10) curves in distinct colors.

B Chen
  • 923
  • 2
  • 12
  • 21
  • 1
    See some useful discussion here - https://stackoverflow.com/a/6076605/496803 and here: https://stackoverflow.com/questions/15282580/how-to-generate-a-number-of-most-distinctive-colors-in-r – thelatemail Mar 28 '19 at 22:25
  • 1
    [This may help](https://graphicdesign.stackexchange.com/questions/3682/where-can-i-find-a-large-palette-set-of-contrasting-colors-for-coloring-many-d). You might also consider using facets or [ggridges](https://cran.r-project.org/web/packages/ggridges/vignettes/introduction.html). – neilfws Mar 28 '19 at 22:26
  • Thanks @thelatemail & ggridges. I will try and see if they can be of help to my problem. – B Chen Mar 28 '19 at 22:32
  • Having gone down this path recently, TLDR: If you're looking for an algo/formula to generate easily distinguishable colors for charting, you will likely not find a solution. find a pallet from one of those links that is close to what you want and modify (trim/expand) it till u have something u can live with – Ethan Mar 28 '19 at 23:42
  • I like the `RColorBrewer` `paired` palette but it only has 12 colours. https://www.nceas.ucsb.edu/~frazier/RSpatialGuides/colorPaletteCheatsheet.pdf – Simon Woodward Mar 29 '19 at 03:01

1 Answers1

0

If you need to distinguish many items, such as curves, you should use other visual means in addition to color (or rather than color) to distinguish them. For example, you can identify the curves with letters or numbers, draw them with different line-dash patterns, use different line thicknesses, and so on.

You should only use color if you can't distinguish your curves in other ways.

Peter O.
  • 32,158
  • 14
  • 82
  • 96