如何显示中间线

Sta*_*tan 5 gnuplot

我有一个方便的脚本正在运行ab并在之后生成绘图.然而,有一个问题,它向我展示了每一点(这是好的),但是我想看到它们之间的平均"线".我将在图片中展示更多内容.

那么有没有办法在中间添加中值/中度游侠?

脚本

#!/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
Run Code Online (Sandbox Code Playgroud)

Ouptut

产量

输出(我希望有什么)

OUTPUT2

Chr*_*oph 4

这可以通过以下选项来完成smooth unique

这使得数据在 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
Run Code Online (Sandbox Code Playgroud)

  • `绘图...线宽2` (2认同)