admin管理员组文章数量:1295901
I found a github containing a Voice Activity Detection algorithm here. the implementation takes in a simple list of doubles (file = sound.txt), and outputs several text files, containing 2 columns of data (files = example_.txt)
It contains an older gnuplot script to display a multiplot. However, this script needs revising with the new gnuplot
Here's the script:
$ gnuplot
$ > set multiplot
$ > plot "sound.txt" with 1:2 lines
$ > filename(n) = sprintf("example_%d.txt", n)
$ > plot for [i=1:10] filename(i) using 1:2 with lines
Can anyone figure out what this script is trying to do, and update it to the new syntax?
Thanks, Charles.
I found a github containing a Voice Activity Detection algorithm here. the implementation takes in a simple list of doubles (file = sound.txt), and outputs several text files, containing 2 columns of data (files = example_.txt)
It contains an older gnuplot script to display a multiplot. However, this script needs revising with the new gnuplot
Here's the script:
$ gnuplot
$ > set multiplot
$ > plot "sound.txt" with 1:2 lines
$ > filename(n) = sprintf("example_%d.txt", n)
$ > plot for [i=1:10] filename(i) using 1:2 with lines
Can anyone figure out what this script is trying to do, and update it to the new syntax?
Thanks, Charles.
Share edited Feb 12 at 3:50 Charles Martin asked Feb 12 at 3:44 Charles MartinCharles Martin 876 bronze badges1 Answer
Reset to default 1That script looks pretty recent to me, and is missing only the unset multiplot
to close off the figure. As written, all 11 plots are drawn on top of each other to make a superposition of "sound.txt" with 10 examples. I don't know whether that is the actual intent.
If you instead want to make a figure with all 11 plots drawn separately in a column, each one spanning the width of the page and occupying ~1/11 of the vertical space you could modify it to something like this. If the individual files do not span an identical range of x values (column 1 data) they may not line up properly unless you explicitly state the desired x range.
filename(n) = sprintf("example_%d.txt", n)
set xrange [0:whatever]
set multiplot layout 11, 1
plot "sound.txt" with 1:2 lines
do for [i=1:10] {
plot filename(i) using 1:2 with lines
}
unset multiplot
本文标签: Need old gnuplot script interpretationStack Overflow
版权声明:本文标题:Need old gnuplot script interpretation - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741622368a2388885.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论