我有一个正在运行的方便脚本ab
然后生成情节。然而有一个问题,它向我显示了每一点(这很好),但是我还想看到它们之间的平均“线”。我会在图中展示更多。
那么有没有办法在上面添加中/中游侠呢?
Script
#!/usr/local/bin/gnuplot
set terminal jpeg size 1280,720
set size 1, 1
set output OUTPUT
set title OUTPUT
set key left top
set grid y
set xdata time
set timefmt "%s"
set format x "%S"
set xlabel 'seconds'
set ylabel "response time (ms)"
set datafile separator '\t'
plot INPUT every ::2 using 2:5 title 'response time' with points
exit
Ouptut
输出(我想要的)
这可以通过smooth unique http://www.gnuplotting.org/manpage-gnuplot-4-6/#x1-157000III option:
这使得x中的数据单调;具有相同 x 值的点被替换为
具有平均 y 值的单个点。然后通过直线段连接所得点。
plot INPUT every ::2 using 2:5 title 'response time' with points,\
'' every ::2 using 2:5 smooth unique title 'average' with lines
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)