使用gnuplot绘图

使用gnuplot绘图

学习资料: http://www.ibm.com/developerworks/cn/linux/l-gnuplot/index.html

$ cat test.plt
set xdata time
set timefmt "%s"
set format x "%Y-%m-%d"
#select font from results of `fc-list -v | grep -e 'family:' -e 'file:' -e '[^a-z]lang:.*zh-cn' | grep -B3 zh-cn | grep family: | sort | uniq`
set terminal png font "WenQuanYi Micro Hei,12"
set output "test.png"
set title "统计分布图"
set xlabel "日期"
set ylabel "数量"
set xrange ["1136044800":"1375113600"]
set xtics rotate by 270
unset key
plot "test.dat" using 1:2 with linespoints
#pause -1
$ cat test.dat
1374163200      2122926
1374249600      1200677
1374336000      1321779
1374422400      1773135
1374508800      1610589
1374595200      1454929
1374681600      1167954
1374768000      825804
1374854400      369708
1374940800      208934
$ eog test.png


一套更易用的数据收集以及画图解决方案:Grafana + influxdb

你可能感兴趣的:(使用gnuplot绘图)