Gnuplot plot don't fill canvas
我正在检查仿真结果。
我需要对3d曲面进行2d映射。我过去用gnuplot做过很多次。
我创建了一个脚本来更快地完成它:
1 2 3 4 5 6 7 8 9 10 11 12 | #!/usr/bin/gnuplot set term pdf size 600, 400 set output"Corr_57res_1bpi.pdf" set view map set xrange [0:20000] set yrange [20:221] set cbrange [-1:1] set ylabel"Temperatures" set xlabel"Number of seqs" #set clabel"Delta correlation" set title"Delta Correlation" plot 'corr_57res_1bpi.dat' u 1:2:3 w image |
输入文件具有以下格式:
1 2 3 4 5 6 7 8 9 10 11 12 13 | 10000 102 0.710468 1000 102 0.672530 20000 102 0.709955 5000 102 0.702273 10000 20 0.512186 1000 20 0.485288 20000 20 0.487161 5000 20 0.506256 10000 221 0.636247 1000 221 0.559779 20000 221 0.621900 5000 221 0.614103 ... |
上次我使用此脚本时(例如1个月前),我获得了填充画布边框的正确2d地图。
现在我重试执行此操作,我获得了以下结果:
错误的结果
我试图修复代码,但没有任何反应,我也尝试将gnuplot更新为5.2.5(我之前的版本为5.0),但没有任何反应。另外,情节的另一种类型也可以完美地工作。
我的想法不多了,所以我希望你能帮助我。
问候
Matteo
对于
1 2 3 4 | p_start_corner[0] = points[0].x; p_start_corner[1] = points[0].y; p_end_corner[0] = points[p_count-1].x; p_end_corner[1] = points[p_count-1].y; |
这实际上意味着数据文件的第一个点和最后一个点确定了图的整个"范围"。通过不对数据文件本身中的记录顺序进行排序,可以先对数据进行排序,从而使脚本更加健壮:
1 2 3 4 5 6 7 8 9 |