gnuplot - 超过 8 种颜色 gnuplot 的颜色序列

标签 gnuplot

我平时用的set colorsequence podo在 gnuplot 5 中选择对色盲个体友好的颜色。但是我的情节包括 12不同的键,因此线条颜色会重复。如何将颜色空间从默认的 8 种颜色扩展到 12 种颜色,同时仍要注意色盲,而不必尽可能手动指定颜色。

最佳答案

可以使用初始化文件来扩展色彩空间。来自 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.



对于对色盲人士友好的颜色,help colorsequence引用 Wong (2011) [Nature Methods 8:441] 的一篇文章。我无权访问这篇文章,但他们似乎有一些来自这篇文章的图片 online .而且好像这篇文章只推荐了8种颜色。

您是否已经考虑过使用虚线或虚线?

关于gnuplot - 超过 8 种颜色 gnuplot 的颜色序列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46775612/

相关文章:

Gnuplot x 轴分辨率

gnuplot - 在 gnuplot 上使用对数刻度

linux - gnuplot "datafile separator"不起作用

graph - 如何在 gnuplot 中设置网格间距

plot - 误差线的 Gnuplot 类型

for-loop - Gnuplot 5.0补丁lvl1在WIN 8.1上崩溃

gnuplot - 在 Octave 中显示轴限制之外的线

python - 绘制直方图 : How can I do it from scratch using data stored in a database?

gnuplot:用图像绘图,如何添加轮廓

graph - 如何在图形上绘制连接的网络节点?