2011-12-29 30 views
0

Gnuplot給我下面的圖片與第二個圖中的奇數不相交,其原點我不能確定。我已經包含了下面的數據,其中x值是單調遞增的,這應該排除這種不相交的可能性。任何幫助感謝! enter image description here 從下面的腳本生成:Gnuplot圖是分離的(數據似乎轉移/排序)

set size 0.8,0.4 
set lmargin 1 
set terminal png 
set output "test.png" 
set multiplot 
set origin 0.1,0.1 
set xtics 5 
set xrange[0:25] 
set xlabel "Year" 
plot "./g1" u ($1+1):2 w lines t "4 years" 
set xlabel "" 
set origin 0.1,0.5 
set xtics format "" 
set x2tics 5 
plot "./g2" u ($1+1):2 w lines t "5 years" 
unset multiplot 

數據G1是:

0.000000 1.000000 
1.000000 3.000000 
2.000000 9.000000 
3.000000 27.000000 
4.000000 0.809131 
5.000000 2.427394 
6.000000 7.282183 
7.000000 21.846549 
8.000000 0.654694 
9.000000 1.964081 
10.000000 5.892243 
11.000000 8.935199 
12.000000 0.529733 
13.000000 1.589200 
14.000000 3.983240 
15.000000 2.509780 
16.000000 0.428624 
17.000000 1.233139 
18.000000 1.951804 
19.000000 0.595792 
20.000000 0.343980 
21.000000 0.809600 
22.000000 0.729229 
23.000000 0.171423 
24.000000 0.258384 
25.000000 0.426250 

數據G2是:

0.000000  1.000000 
1.000000  3.000000 
2.000000  9.000000 
3.000000  27.000000 
4.000000  81.000000 
5.000000  2.427394 
6.000000  7.282183 
7.000000  21.846549 
8.000000  65.539647 
9.000000  196.618942 
10.000000  5.892243 
11.000000  17.676730 
12.000000  53.030190 
13.000000  159.090569 
14.000000  241.250367 
15.000000  14.302798 
16.000000  42.908394 
17.000000  128.725182 
18.000000  322.642448 
19.000000  203.292210 
20.000000  34.718531 
21.000000  104.155593 
22.000000  299.652772 
23.000000  474.288428 
24.000000  144.777335 
25.000000  84.275565 

回答

2

真奇怪。在我的系統(Ubuntu的11.10 64位),我沒有看到這個問題您有:

$ gnuplot --version 
gnuplot 4.4 patchlevel 3 

$ gnuplot < a.gnuplot # a.gnuplot is your script, unmodified 

而且它會產生這樣的:

gnuplot output on my system

如果我是你,我會檢查:

  1. 的gnuplot版本
  2. 輸入文件 - 在vim使用集列表,看看是否有任何猖獗字符隱藏
+0

謝謝,這是一個錯誤的性格,或者更確切地說缺乏這樣的。上面這一行沒有得到適當的評論。 – Richard 2011-12-30 03:27:19