2012-05-05 5 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 좌표로, 두 번째 및 세 번째 열을 y로 지정합니다.

하지만 내 스크립트를 실행할 때이 오류가 발생합니다

line 0: Too many columns in using specification 

내가 잘못하고있는 중이 야 무엇을?

답변

6

시도 : 일반적으로 단지 "x 값이"암시 적으로 명시 X 레이블을 설정하려면 0부터 시작 하나마다에 의해 증가되는 데이터의 1 열을 가지고

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

히스토그램

, 당신은 사용할 필요가 xticlabels 이것은 주어진 열의 문자열을 받아 레이블로 사용합니다.