我必须使用相同的配色方案绘制多个矩阵。目前我正在使用这个程序。
do for [i=0:10] {
set term png
set output 'sort'.i.'.png'
unset key
plot 'sort'.i.'.dat' matrix with image
}
这是绘制不同颜色方案的不同情节。
答案 0 :(得分:0)
您必须为所有地块设置固定的cbrange
。如果您事先知道此范围,则可以使用
set cbrange[min:max]
开始循环文件之前。
如果您不知道范围,那么在进行绘图之前必须使用stats
命令计算它:
max = min = 0
do for [i=0:10] {
stats 'sort'.i.'.dat' matrix using 3 nooutput
if (i == 0) {
max = STATS_max
min = STATS_min
} else {
if (STATS_max > max) { max = STATS_max }
if (STATS_min < min) { min = STATS_min }
}
}
set cbrange [min:max]
do for [i=0:10] {
set term png
set output 'sort'.i.'.png'
unset key
plot 'sort'.i.'.dat' matrix with image
}