首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用gnuplot绘制多个图的Shell脚本

用gnuplot绘制多个图的Shell脚本
EN

Stack Overflow用户
提问于 2016-04-16 17:11:18
回答 1查看 252关注 0票数 2

我试图分析多个tcp拥塞控制算法,并试图绘制多个图,但我无法生成一个比较图。

这是我的脚本代码:

代码语言:javascript
复制
gnuplot -persist <<"EOF"
set xlabel "time (seconds)"
set ylabel "Segments (cwnd, ssthresh)"
plot "./cubic.out" using 1:7 title "snd_cwnd cubic", \
 "./cubic.out" using 1:($8>=2147483647 ? 0 : $8) title "snd_ssthresh cubic",/
  "./reno.out" using 1:7 title "snd_cwnd reno", \
  "./reno.out" using 1:($8>=2147483647 ? 0 : $8) title "snd_ssthresh reno"
  ,/
EOF

但是这个脚本把图分成两个子部分(都不是原始人)。

谢谢

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-04-18 07:35:36

按照米格尔的建议,下面是您应该尝试的内容(记住让EOF启动行,在它变得不相关之前的任何空格):

代码语言:javascript
复制
gnuplot -persist <<"EOF"
set xlabel "time (seconds)"
set ylabel "Segments (cwnd, ssthresh)"
plot "./cubic.out" using 1:7 title "snd_cwnd cubic", \
 "./cubic.out" using 1:($8>=2147483647 ? 0 : $8) title "snd_ssthresh cubic", \
  "./reno.out" using 1:7 title "snd_cwnd reno", \
  "./reno.out" using 1:($8>=2147483647 ? 0 : $8) title "snd_ssthresh reno" , \
EOF
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36667170

复制
相关文章

相似问题

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