gnuplot:矩阵图的比例轴

gnuplot:矩阵图的比例轴,gnuplot,Gnuplot,我有一个矩阵,output.dat: 0 0 0 0 0 0 3 7 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 11 16 6 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 8 4 16 4 1 0 0 0 0 0 0 0 0

我有一个矩阵,output.dat:

0   0   0   0   0   0   3   7   1   0   0   0   0   0   0   0   0   0   0   0
0   0   0   0   0   0   0   11  16  6   1   0   0   0   0   0   0   0   0   0
0   0   0   0   0   7   8   4   16  4   1   0   0   0   0   0   0   0   0   0
0   0   0   0   0   2   2   5   11  3   1   0   0   0   0   0   0   0   0   0
0   0   0   0   0   3   1   9   10  9   0   0   0   0   0   0   0   0   0   0
0   0   0   0   0   12  28  13  11  5   0   0   0   0   0   0   0   0   0   0
0   0   0   0   1   6   17  33  14  2   0   5   2   0   0   0   0   0   0   0
0   0   0   0   0   1   13  15  11  6   0   0   5   7   0   0   0   0   0   0
0   0   0   0   0   0   3   3   8   3   0   0   0   3   0   0   0   0   0   0
0   0   0   0   0   0   0   8   8   8   1   2   1   3   2   0   0   0   0   0
0   0   0   0   0   0   0   1   17  10  4   7   4   12  3   0   0   0   0   0
0   0   0   0   0   3   2   3   6   22  9   5   8   5   1   0   0   0   0   0
0   0   0   0   0   1   5   7   10  35  4   6   6   9   4   0   0   0   0   0
0   0   0   0   0   2   12  12  30  52  23  11  8   7   5   1   0   0   0   0
0   0   0   0   1   7   25  16  33  30  26  16  21  19  5   2   0   0   0   0
0   0   0   0   0   0   12  36  19  22  28  19  30  17  9   0   0   0   0   0
0   0   0   0   0   11  18  12  37  32  27  26  33  21  10  12  3   0   0   0
0   0   0   0   0   11  14  23  44  59  45  26  28  9   3   7   0   0   0   0
0   0   0   0   0   0   0   8   19  23  22  11  34  32  25  7   0   0   0   0
0   0   0   0   0   0   0   0   4   8   9   16  21  26  20  11  12  4   6   2
在bash脚本中使用此选项可以生成非常精细的矩阵图:

echo "set terminal png font arial 30 size 1600,1200;
set output 'output.png';set xrange [1:20];set yrange [1:20];set xlabel 'x';set ylabel 'y';
set pm3d map;set pm3d interpolate 0,0;splot 'output.dat' matrix" | gnuplot
但是,我希望x轴和y轴表示“0…1”,而不是“1…20”。如果我只是将
xrange[1:20]
更改为
[0:1]
则不会绘制任何数据。而且缩放数据也不起作用。使用
xticlabels
(至少据我所知)也没有成功更改轴


如何将x和y更改为“0…1”而不是“1…20”

我不知道您尝试了什么,但是使用
语句在
中缩放效果很好:

echo "set terminal pngcairo;set autoscale fix; set tics out nomirror; 
      set xlabel 'x';set ylabel 'y'; set pm3d map interpolate 0,0; 
      splot 'output.dat' matrix using (\$1/19.0):(\$2/19.0):3" | gnuplot > output.png

非常感谢您。我想我需要了解像
using
这样的语句是可用的。还可以使用(\$1/$x):(\$2/$x):3将其推广到
矩阵。我在想我得手动做点什么。