【发布时间】:2021-04-27 21:51:21
【问题描述】:
我的数据文件如下:
#smaller matrix
5 0.00 0.25 0.50 0.75 1.00
0.00 1 2 3 4 5
0.25 5 4 3 2 1
0.50 1 2 3 4 5
0.75 5 4 3 2 1
1.00 1 2 3 4 5
#bigger matrix
8 0.00 0.25 0.50 0.75 1.00 1.25 1.50 1.75
0.00 1 2 3 4 5 6 7 8
0.25 5 4 3 2 1 0 1 2
0.50 1 2 3 4 5 6 7 8
0.75 5 4 3 2 1 0 1 2
1.00 1 2 3 4 5 6 7 8
1.25 5 4 3 2 1 0 1 2
1.50 1 2 3 4 5 6 7 8
1.75 5 4 3 2 1 0 1 2
gnuplot脚本如下:
set term png size 900, 400
set output 'matrices-test.png'
set multiplot layout 1,2
set xrange [0:1.0]
set yrange [0:1.0]
plot 'matrices-test' index 0 nonuniform matrix w image
set xrange [0:1.75]
set yrange [0:1.75]
plot 'matrices-test' index 1 nonuniform matrix w image
unset multiplot
当我运行这个脚本时,较小的矩阵会变形。图像倾斜,数据似乎被破坏:
如果我将每个矩阵放入一个单独的文件中,它们都可以毫无问题地绘制出来。
我做错了吗?或者这是gnuplot中的一个错误? (我在 Ubuntu Linux 中使用的是最新版本 5.4.1。)
【问题讨论】: