首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >网格图中吞吐量的清晰区分

网格图中吞吐量的清晰区分
EN

Stack Overflow用户
提问于 2014-04-27 17:23:06
回答 1查看 1.3K关注 0票数 4

我正在比较无线链路在两种情况下的吞吐量,我想把它们都画成一个图。问题在于,通过绘制吞吐量与时间的关系所得到的图如图中所示。

当我在同一张图中绘制两个吞吐量时,我获得了第二张图片中的内容。

代码语言:javascript
复制
it is not clear to differentiate between the two. 

下面的代码用于绘制单个吞吐量图

代码语言:javascript
复制
#!/usr/bin/gnuplot

reset

!iperf -c 192.168.1.101 -i 0.5 -t 60 > a

#this is used for deleting first 6 lines 
!sed -i 1,+5d a

#used to delete last line
!sed '$d' a > cropped

!cat cropped | cut -c 7-10 > b
!cat cropped | cut -c 35-38 > c
!paste b c > d

!awk 'BEGIN{print "0.0  0.0"}{print}' d > e

set xlabel "time"
set ylabel "throughput"

set terminal png nocrop enhanced font arial 8 size 900,300
#set terminal png size 900, 300

set output "chart_1.png"

#table name below graph(naming curve by colour)
set key below

plot  'e' using 1:2 title "Throughput Performance" with lines

下面是我用来绘制这两幅图的代码

代码语言:javascript
复制
#!/usr/bin/gnuplot

reset



set xlabel "time"
set ylabel "throughput"


set terminal png nocrop enhanced font arial 8 size 900,300
#set terminal png size 900, 300

set output "chart_1.png"


#table name below graph(naming curve by colour)
set key below



set style data linespoints

plot "1" using 1:2 title "case1", \
     "2" using 1:2 title "case2"

输出如下:

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-04-27 18:05:55

首先要注意的是:使用pngcairo终端,它提供了更好的抗混叠。

为了处理您的数据,您可以使用不同的平滑选项,如smooth csplinessmooth bezier或类似的(参见交互式gnu图终端中的help smooth ):

代码语言:javascript
复制
plot "1" using 1:2 smooth csplines, "2" using 1:2 smooth csplines

您使用的平滑变量又取决于数据的含义。

还可以帮助的是使用其他点类型,然后使用默认的点类型,例如,第一个点类型是pt 1,第二个点类型是pt 7,使用test命令检查可用的点类型,请参见Gnuplot line types

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23326538

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档