2013-07-22 11 views
0

如標題所示,我想找到一種方法來控制模式下的xtics。輸出如下 enter image description here 前兩行顯示的圖是正確的。但是,以下三者遭受同樣的問題。 x軸上的數字彼此非常接近,並且在某些情況下重疊。那麼,有沒有辦法解決這個問題?所有的輸入都是從外部數據文件中讀取的,我不能預先知道t的最大值是什麼,以至於在每個圖中set xrange [0:max]然後控制這些文本。順便說一下,gnuplot可能在繪圖階段之前讀取外部數據文件,並在每個繪圖中定義t的最大值? 非常感謝提前。如何在多槽模式下控制xticks

編輯

用於生產上述輸出的腳本如下所示:

reset 

set term postscript eps enhanced "Helvetica" 20 size 7in, 11in 
set output 'plots.eps' 

set size 1,1 

set multiplot layout 4, 2 

unset key 

# plotting the time-evolution of the mLCN 
set xrange [*:*] 
set xlabel 't' 
set ylabel 'mLCN' 
plot "hh.rli" u 1:3 w l lc rgb 'black' 

# plotting the time-evolution of the RLI 
set xrange [*:*] 
set xlabel 't' 
set ylabel 'log(RLI)' 
plot "hh.rli" u 1:(log10($2)) w l lc rgb 'black' 

# plotting the time-evolution of the FLI 
set xrange [*:*] 
set xlabel 't' 
set ylabel 'log(FLI)' 
plot "hh.fli" u 1:(log10($2)) w l lc rgb 'black' 

# plotting the time-evolution of the OFLI 
set xrange [*:*] 
set xlabel 't' 
set ylabel 'log(OFLI)' 
plot "hh.fli" u 1:(log10($3)) w l lc rgb 'black' 

# plotting the time-evolution of the SALI 
set xrange [*:*] 
set xlabel 't' 
set ylabel 'log(SALI)' 
plot "hh.sali" u 1:(log10($2)) w l lc rgb 'black' 

# plotting the time-evolution of the GALIs 
set xrange [*:*] 
set xlabel 't' 
set ylabel 'log(GALIs)' 
plot "hh.gali" u 1:(log10($2)) w l lt 1 lc rgb 'green',\ 
    "hh.gali" u 1:(log10($3)) w l lt 1 lc rgb 'red',\ 
    "hh.gali" u 1:(log10($4)) w l lt 1 lc rgb 'blue' 

# plotting the time-evolution of the MEGNO 
set xrange [*:*] 
set xlabel 't' 
set ylabel 'MEGNO' 
plot "hh.megno" u 1:2 w l lc rgb 'black' 

# plotting the time-evolution of the Spectral Distance (D) 
set xrange [*:*] 
set yrange [-0.1:4] 
set xlabel 't' 
set ylabel 'D' 
plot "hh.sd" u 1:2 w l lc rgb 'black' 

unset multiplot 

reset 

set terminal windows 

quit 
+0

是否可以發佈您的腳本? – Omegaman

+0

@GB我剛剛上傳了相應的腳本。 –

回答

0

你可以告訴gnuplot的與旋轉刻度標籤:

set xtics rotate 

那我會採取更多的垂直空間,但。您可以通過選擇一個小於90度的角度來找到妥協方案:

set xtics rotate by 45 

或任何角度看起來最好。

+0

我不想旋轉刻度。我想要的是一種計算繪圖階段之前x的最大值的方法,以便使用正常程序集xtics [0:max],或者如果無法找到更好地控制滴答聲之間距離的方法(可能使用更少)。 –

0

您可以嘗試增加單個抽搐之間的距離。例如,在左下角的情節中,不是顯示每500次抽獎,而是每1000次抽獎。這可以通過使用

set xtics 1000 
相關問題