I normally used set colorsequence podo
in gnuplot 5 to choose colors that are friendly to color blind individual.However my plot consist of 12
different keys and thus the line colors will repeat.How do i extend the colorspace to 12 colors from the default 8 while still taking care of color blindness and not having to specify the colors manually as far as possible.
Extending the colorspace can be done with a initialization file. From help set linetype
:
The recommended way to do this is to add to the run-time initialization file ~/.gnuplot a sequence of commands like
if ((GPVAL_VERSION < 4.5) \ || (!strstrt(GPVAL_COMPILE_OPTIONS,"+USER_LINETYPES"))) \ exit set linetype 1 lc rgb "dark-violet" lw 2 pt 0 set linetype 2 lc rgb "sea-green" lw 2 pt 7 set linetype 3 lc rgb "cyan" lw 2 pt 6 pi -1 set linetype 4 lc rgb "dark-red" lw 2 pt 5 pi -1 set linetype 5 lc rgb "blue" lw 2 pt 8 set linetype 6 lc rgb "dark-orange" lw 2 pt 3 set linetype 7 lc rgb "black" lw 2 pt 11 set linetype 8 lc rgb "goldenrod" lw 2 set linetype cycle 8
Every time you run gnuplot the line types will be initialized to these values. You may initialize as many linetypes as you like.
For colors which are friendly to colorblind people, help colorsequence
refers to an article from Wong (2011) [Nature Methods 8:441]. I don't have access to the article, but it seems that they have some images from this article online. And it seems that this article recommends only 8 colors.
Have you already thought about using dotted or dashed lines?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With