gpt4 book ai didi

gnuplot - 如何在顶部显示中线

转载 作者:行者123 更新时间:2023-12-04 20:35:32 25 4
gpt4 key购买 nike

我有一个方便的脚本正在运行 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

输出

output

输出(我想要的)

output2

最佳答案

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

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

关于gnuplot - 如何在顶部显示中线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36496201/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com