gnuplotを使う

CSVからグラフを作る方法です。

yum install gnuplot
vim plotdata.plt
---
set terminal png font "Vera.ttf,10" size 640,480
set output '/path/to/plot.png'
set key spacing 1.3
set datafile separator ","
set xdata time
set timefmt "%s"
set format x "%Y%m%d %H:%M"
set xtics rotate by 90
plot '/path/to/csv' using ($1+32400):2 with linespoints pt 7 lw 2 ps 1  notitle
---

CSVはこんな感じ(unixtime,値)

1445579123,0.019
1445579401,0.032
1445580001,0.089
1445580601,0.100
1445581201,0.073
1445581801,0.078
1445582401,0.082
1445583001,0.107
1445583601,0.057

作成

export GDFONTPATH=$GDFONTPATH:/usr/share/fonts/ipa-gothic/:/usr/share/fonts/bitstream-vera/
gnuplot plotdata.plt