0
您好我正在使用gnuplot來創建大量的圖。爲了節省工作量,我編寫了一個腳本,試圖繪製所有可能的圖表。Gnuplot嵌套做循環和在同一個圖上繪圖
#!/usr/bin/gnuplot
reset
is_missing(x)=system("./ismissing.sh ".x)
set terminal post eps enhanced color
set key inside right top vertical Right noreverse enhanced autotitles box linetype -1 linewidth 1.000
set grid
models="Cebeci-Smith Baldwin-Lomax Spalart-Allmaras Launder-Sharma Chien"
files="./CebeciOut/ ./BaldwinOut/ ./SpalartOut/ ./LaunderOut/ ./ChienOut/"
xgrid="35000 70000 140000 280000 560000"
# Plot grid convergence Spalart
do for [f=1:words(files)]{
set output sprintf('%s%s',word(files,f),'ZPGGridConvergence.eps')
set title sprintf("%s%s",word(models,f), " ZPG Grid Convergence")
set xlabel "N_y"
set ylabel "C_f Final"
print f
do for [i=1:words(xgrid)]{
filename=sprintf("%s%s%s%s",word(files,f),'yconv_',word(xgrid,i),"x")
if(is_missing(filename)==0){
plot filename using 1:2 title sprintf("%s%s",word(xgrid,i), " X Gridpoints") with linespoints
}
}
}
不幸的是我有一個問題,一個完整的迭代的腳本失敗後,IE F從未盡管第一地塊成功完成了2。給出的錯誤是
cannot open file; output not changed
line 25: util.c: No such file or directory
我沒有設法解密。任何幫助將非常感激。還有一種方法可以在這個循環中使用replot,因爲我還沒有創建一個圖。 謝謝