2013-07-04 42 views
0

我想繪製以下數據:GNU情節2D曲線

SMO LogiBoost BFTree 
25(>=7) 0.81 0.72 0.62 
30(>=7) 0.83 0.76 0.56 
35(>=7) 0.84 0.70 0.75 
40(>=7) 0.74 0.67 0.58 
25(>=8) 0.73 0.76 0.57 
30(>=8) 0.78 0.74 0.65 
35(>=8) 0.83 0.78 0.68 
40(>=8) 0.75 0.67 0.66 
25(>=9) 0.69 0.74 0.62 
30(>=9) 0.79 0.75 0.62 
35(>=9) 0.82 0.82 0.69 
40(>=9) 0.78 0.80 0.53 
25(>=12) 0.77 0.78 0.67 
30(>=12) 0.76 0.74 0.59 
35(>=12) 0.91 0.94 0.75 
40(>=12) 0.75 0.75 0.64 
25(>=15) 0.74 0.74 0.60 
30(>=15) 0.80 0.71 0.64 
35(>=15) 0.80 0.71 0.76 
40(>=15) 0.75 0.75 0.75 
SansVar(>= 7) 0.80 0.77 0.61 
SansVar(>=8) 0.71 0.75 0.56 
SansVar(>=9) 0.81 0.76 0.71 
SansVar(>=12) 0.84 0.82 0.68 
SansVar(>=15) 0.81 0.83 0.75 

第一列表示X標籤和一號線表示Y標貼enter image description here

我嘗試添加了X標籤也可以彼此重疊,是否可以修復? enter image description here

Command to plot: plot "data1.txt" using 1:xtic(1) title 'SMO' with lines,\ "data.txt" using 2:xtic(1) title 'LogiBoost' with lines, \ "data.txt" using 3:xtic(1) title 'BFTree' with lines 

我發現了一個可能的解決方案,是下面的,但還是問題SI的xlabels不適合整體形象。

set xtics rotate by -45 

回答

1

您可以嘗試調整邊距。

reset 
set terminal png 
set rmargin at screen 0.85 
set bmargin at screen 0.25 
set output 'out.png' 
set xtics rotate by -45 scale 0 
plot "data.dat" using 1:xtic(1) title 'SMO' with lines, \ 
    "" using 2:xtic(1) title 'LogiBoost' with lines, \ 
    "" using 3:xtic(1) title 'BFTree' with lines 

enter image description here