【发布时间】:2014-01-25 20:25:27
【问题描述】:
我想以编程方式生成一个 gnuplot 绘图命令,例如:
plotline = sprintf("'datafile1.dat' using %d:3 with points, '%s' using %d:3 with points",i,targfile,i)
plot plotline
第二行中的“情节线”被扩展以生成并执行完整的命令,例如:
plot 'datafile1.dat' using 8:3 with points, 'datafile2.dat' using 8:3 with points
我想这样做是为了在终端中回显“plotline”,因此可以确定在 gnuplot 脚本中循环遍历一组列/数据文件/任何内容时所显示的确切内容。
是否有/执行此操作的语法是什么,或者您能否建议另一种方法来报告已执行的绘图命令(无需拆分为绘图命令和一组单独的命令来报告当前变量状态)。
谢谢!
【问题讨论】:
-
sprintf("format",x,...) - result from C-language sprintf... 见这里gnuplot.info/docs_4.2/gnuplot.html
标签: gnuplot