1、gnuplot 的命令文件: test.conf
set terminal png truecolor size 750,550 #指定输出成png图片,且图片大小为550×250,需要ligpng支持,采用默认颜色设定
set output "test.png" #指定输出png图片的文件名
set autoscale #轴向标记自动控制
set xdata time #X轴数据格式为时间
set timefmt "%H:%M" #时间输入格式为"小时:分钟"
set format x "%H:%M" #x轴时间输出格式
set style data lines #数据显示方式为连线
set xlabel "Time" #X轴标题
set ylabel "Load %" #Y轴标题
# set title "image.tuku.china.com flow" #图片标题
set grid #显示网格
plot "data.txt" using 1:2 title "Average value" #从test.log文件中读取第一列和第二列作为X轴和Y轴数据,示例名"log_flow"
11:24 82
11:19 28
11:14 18
11:09 15
11:04 14
10:59 35
10:54 8
10:49 29
10:44 57
10:39 115
10:34 93
10:29 25
10:24 4
10:19 71
10:14 46