How to show the median line on top

I have a handy script that runs ab and generates a chart later. However, there is a problem, it shows me every point (which is good), however I would also like to see the middle "line" between them. I will show more in the picture.

So, is there a way to add a median / middle ranger on top?

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

output

Exit (what I would like)

output2

+5
source share
1 answer

This can be done using the smooth unique option:

This makes the data monotonic in x; points with the same value of x are replaced by one point that has an average value of y. The resulting points are then connected by straight segments.

 plot INPUT every ::2 using 2:5 title 'response time' with points,\ '' every ::2 using 2:5 smooth unique title 'average' with lines 
+3
source

Source: https://habr.com/ru/post/1246686/


All Articles