Gnuplot:从命令绘制数据

Tom*_*han 1 gnuplot

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...
Run Code Online (Sandbox Code Playgroud)

上面的 makecmd包含一个长行,所有输出行都被粉碎在一起。

cho*_*oba 6

是的你可以:

plot '< ./mycmd'
Run Code Online (Sandbox Code Playgroud)