2012-05-28 6 views
-1
plot data_file using 1:2 with box fs solid title "" 

위의 명령을 사용하여 gnuplot에 막대 그래프를 그립니다. 그러나 생성 된 그래프는 각 상자의 너비가 매우 높은 일종의 연속적인 단계 그래프입니다.gnuplot 막대 그래프가 작동하지 않습니다.

위의 문과 관련된 문제점은 무엇입니까 ?? 그리고 gnuplot에서 막대 그래프를 그릴 때 선호되는 방법은 무엇입니까 ??

답변

1

스크립트의 내용이

set boxwidth 1 relative 
set style data histograms 
set style fill solid 1.0 border -1 
set datafile separator "," 
plot 'data.csv' using 2:xticlabels(1) notitle 

set terminal png truecolor font small size 600,500 
set output 'image1.png' 
replot 

다음 (gnuplot.script)

$ gnuplot gnuplot.script

해야하지만이 link
data.csv이

"MCU", 1.8 
"Radio Tx", 19.5 
"Radio Rx", 21.8 
"Flash READ", 4 
"Flash WRITE", 20 

있다 따라

관련 문제