1

我知道我可以stdin使用'-'作为数据源的数据进行绘图,但是有什么方法可以以相同的方式从命令中绘制数据输出?即,我可以在 gnuplot 脚本本身中指定命令,而不是运行命令和管道到 gnuplot 脚本吗?

像这样的东西(但这不起作用):

set terminal pngcairo
set output 'test.png'

cmd = "`./mycmd`" # running ./mycmd in terminal gives my data to stdout.
                  # the command can be several other commands, piped together.
                  # i'm only interested in whatever comes to stdout after running
                  # the entire thing.

plot cmd u 2:3 w lines # etc...

上面的 makecmd包含一条长线,所有的输出线都拼在一起。

4

1 回答 1

4

是的你可以:

plot '< ./mycmd'
于 2013-05-16T14:33:21.040 回答