I have a handy script that is running ab
and generating plot afterwards. However there is a problem, it shows me every point (which is good), however I would like to see also the average "line" between them. I will show more in the picture.
So is there any way to add the median/medium ranger on top?
#!/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
That can be done with the smooth unique
option:
This makes the data monotonic in x; points with the same x-value are replaced by a single point having the average y-value. The resulting points are then connected by straight line segments.
plot INPUT every ::2 using 2:5 title 'response time' with points,\
'' every ::2 using 2:5 smooth unique title 'average' with lines
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With