Gnuplot:如何从二进制格式绘制多个时间序列
有人可以解释一下 gnuplot 二进制格式吗?
目标是将二进制管道中的两个时间序列绘制为同一张图上的折线图。该系列是 float64 的。我使用类似的方式将它们通过管道传输:
plot "-" binary format="%float64" endian=big with lines
但是,我不明白数据应该按什么顺序排列。在上面,我可以指定 array=10
,并通过管道输入 10 个数字;这有效。但是,两个系列呢?如果它们的索引不同怎么办?
提前致谢。
Would someone please elucidate the gnuplot binary format?
The goal is to plot two time series from a binary pipe as line graphs on the same graph. The series are float64's. I'm piping them in using something like:
plot "-" binary format="%float64" endian=big with lines
However, I don't understand what order the data should go in. In the above, I can specify array=10
, and pipe in 10 numbers; this works. However, what about two series? And what if they are indexed differently?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将其用于两个系列:
我建议您使用
record
而不是array
,这样您就可以使用using 手动指定或操作 X 轴值($0*2):1
命令。如果它们的索引不同,例如交错,则无法向 gnuplot 指示这一点。只需将信息复制到管道两次,并用
*
忽略无用部分:无论如何,gnuplot 不允许用相同的输入数据表示两个图形,因此数据必须复制最多两次时代的。
希望有帮助!
You can use this for two series:
I recommed you to use
record
instead ofarray
, this way you can manually specify or operate the X axis value with theusing ($0*2):1
command.If they are indexed differently, for example interlaced, there is no way to indicate that to gnuplot. Just copy to the pipe the information twice and ignore the non-usefull part with an
*
:Anyway, gnuplot does not allow to represent two graphs with the same input data, so the data must be copyed twice most of the times.
Hope that helps!