【发布时间】:2013-05-11 11:14:08
【问题描述】:
我知道我可以使用'-' 作为数据源来绘制来自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...
以上内容使cmd 包含一个长行,所有输出行都被粉碎在一起。
【问题讨论】:
标签: gnuplot