2012-05-05 39 views
2

を使用して、私が含まれているファイルのヒストグラムを作成したい:gnuplotのヒストグラム:ライン0:あまりにも多くの列仕様

1 144 12.54 
2 564 02.34 
3 231 01.23 
4 452 07.12 

と私は私のスクリプトにその目的のために使用することは、次のとおりです。

gnuplot << EOF 
      set terminal gif 
      set terminal postscript eps color enhanced 
      set output "diagramma"; 
      set title 'Diagramma' 
      set key off 
      set style data histogram 
      set style histogram cluster gap 1 
      set style fill solid border -1 
      set boxwidth 0.9 
      set autoscale 
      set xlabel "May" 
      plot 'finalsumfile' using 1:2 with histogram, 'finalsumfile' using 1:3 with histogram 

EOF 

私は最初の列をx座標、2番目と3番目の列をyとします。

しかし、私は私のスクリプトを実行すると、このエラーが発生します

line 0: Too many columns in using specification 

私が間違っているのは何を?

答えて

6

試してみてください。

plot 'finalsumfile' using 2:xticlabels(1) with histogram 

ヒストグラムは通常、唯一の明示的なXのラベルを設定するには0から始まる「x値」は暗黙のうちに1ずつインクリメントされるデータの1列を取る、あなたが使用する必要がありますxticlabelsは、指定された列の文字列を受け取り、それをラベルとして使用します。

関連する問題