目次

gnuplot


gnuplot は,unix ベースのグラフ描画ツール.テキストデータからグラフ描 画が行なえる.結果は,gui 表示しても良いし, png/jpg/eps/html(canvas)/terminal などのファイルに落すこともできる.

データ形式

# 10/01 のデータ
2011/10/01_00:00:38 102.891
2011/10/01_00:01:38 102.891
2011/10/01_00:02:38 102.891
2011/10/01_00:03:38 102.891
2011/10/01_00:04:38 102.892
2011/10/01_00:05:38 102.892
2011/10/01_00:06:38 102.892
2011/10/01_00:07:38 102.892
2011/10/01_00:08:38 102.892

データの描画から,ファイルへの保存までの流れ

% gnuplot
gnuplot> set xdata time 
gnuplot> set timefmt "%Y/%m/%d_%H:%M:%S"
gnuplot> set xrange ["2011/10/01_00:00:00":"2011/12/18_00:00:00"]
gnuplot> set yrange [0:350]
gnuplot> set xtics "2011/10/01_00:00:00" 345600
gnuplot> set xlabel "Date"
gnuplot> set ylabel "cumulative sent data (GB)"
gnuplot> set grid 
gnuplot> set title "2011/10/01 - 2011/12/17 cumulative sent data"
gnuplot> plot "data.txt" using 1:2 with lines
gnuplot> plot "data.txt" using 1:2 with smooth csplines with lines, \
gnuplot>      "data.txt" every 1000 using 1:2 with points
gnuplot> replot
gnuplot> show all
gnuplot> save "hoge.plt"
gnuplot> load "hoge.plt"
gnuplot> set terminal 
gnuplot> set terminal png
gnuplot> set output "hoge.png"

その他

set terminal canvas

参考 URL

-