我想以編程方式產生gnuplot的繪圖命令,如:gnuplot用sprintf生成繪圖命令?
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腳本中循環一組列/ datafiles /循環內部時顯示的內容。
是否存在/執行此操作的語法是什麼,或者您能否提出另一種報告繪圖命令執行的方法(不分割爲繪圖命令和單獨的一組命令來報告當前變量狀態)。
謝謝!
'sprintf(「format」,x,...) - 來自C語言sprintf'的結果...看到這裏http://www.gnuplot.info/docs_4.2/gnuplot.html – nrathaus