空間

2014-05-06 35 views
3

我已經GNUPLOT這樣的腳本:空間

set term pos eps 
set style data histogram 
set style histogram clustered gap 1 
set grid y 
set boxwidth 0.8 absolute 
set style fill transparent solid 0.8 noborder 
#set key outside right top vertical Left 

#component stuff 
set output 'eps/component.eps' 
set title "Component in interesting Issues" 
set xlabel "Components" 
set xtics nomirror rotate by -270 
plot 'dat/!component' using 2:xtic(1) t "Count" lc rgbcolor "blue" lt 1 

和數據:

Cmp count 
AM 167 
NM 90 
RM 83 
JT 53 
TT 51 
RED 32 
MAP 29 
COMM 3 
SX 6 
HS 68 

,這是我的輸出:

output

我看到我的圖形在Y軸和第一個條之間有很長的距離。我怎樣才能均勻地分散出去?

+0

謝謝@Tom Fenech – indi60

回答

2

gnuplot會被數據文件中的第一行弄糊塗,它應該是標題。只要跳過這符合every ::1和自動縮放是好的:

plot 'dat/!component' using 2:xtic(1) every ::1 t "Count" lc rgbcolor "blue" lt 1 

結果與4.6.4:

enter image description here

一般來說,你不需要使用直方圖這類數據,繪圖風格with boxes也很好。

+0

謝謝@christoph 此解決方案爲我工作... – indi60