Colors 强制轮廓范围并反转颜色标签
我正在使用以下脚本Colors 强制轮廓范围并反转颜色标签,colors,gnuplot,contour,Colors,Gnuplot,Contour,我正在使用以下脚本 set term pngcairo font ",18" enh size 1400,1400 se
set term pngcairo font ",18" enh size 1400,1400
set view map
set key at screen 1, 0.9
unset surface
set contour base
set cntrparam levels incremental 0.00, 0.06, 2
#
set linetype 2 lc rgb "#8F2FFF"
set linetype 3 lc rgb "#8F2FFF"
set linetype 4 lc rgb "#8F2FFF"
set linetype 5 lc rgb "#2F30FF"
set linetype 6 lc rgb "#2F30FF"
set linetype 7 lc rgb "#2F8EFF"
set linetype 8 lc rgb "#2F8EFF"
set linetype 9 lc rgb "#2FFFD6"
set linetype 10 lc rgb "#2FFFD6"
set linetype 11 lc rgb "#35FF2F"
set linetype 12 lc rgb "#35FF2F"
set linetype 13 lc rgb "#FEFF2F"
set linetype 14 lc rgb "#FEFF2F"
set linetype 15 lc rgb "#FFAF2F"
set linetype 16 lc rgb "#FFAF2F"
set linetype 17 lc rgb "#FF362F"
set linetype 18 lc rgb "#FF362F"
set xra[0.:12]
set yra[0.:12]
set xtics out nomirror
set ytics axis in offset -4.0,0 nomirror
set out "foo.png"
splot sin(x) * cos(y) w l lw 4
获得下图
我现在的问题是,尽管我使用了set cntrparam levels incremental 0.00、0.06、2
,但仍然得到了最大轮廓值0.96
。谁能告诉我如何强制gnuplot将轮廓范围固定到2
。第二个问题是:是否可以反转颜色标签顺序,使其从较低的值开始到较高的值?换句话说,我希望gnuplot在带有洋红线的标签顶部显示值0,以此类推,直到带有红线的标签底部显示最高值。函数sin(x)*cos(y)
从上方以1
为界,因此得到的最大轮廓级别为0.96,因为下一个级别为1.02(步长为0.06),但没有对应于该假设轮廓的x,y
实际值
至于图例中标题的顺序,set key invert
在这里似乎不起作用。但是,您可以颠倒Gnuplot构造等高线的顺序,即使用
set cntrparam levels incremental 0.96, -0.06, 0
set isosamples 1000,1000 #to get smoother contours...
而不是设置cntrparam级别增量0.00、0.06、2