bash - Script Gnuplot on windows OS -
bash - Script Gnuplot on windows OS -
i automate generation of graphs list of info files.
more details : have directory contain info files. need generate graph each of these files (hundreds). have gnuplot file generate 1 graph name of info file specified gnuplot script.
for illustration :
plot 'myfile' index 1 using 1:2 linespoints pointtype 2 linecolor rgb "green" title "leg"
i need able replace "myfile" variable name can iterated on files of directory.
you have (windows) batch file next command:
for %%g in (*.dat) gnuplot.exe -e "fn='%%g'" script
this run gnuplot (and script) every .dat
file in current directory.
the -e
switch used input variables via command line (here filename, surrounded quotes in case contains spaces).
if want run command straight shell (as opposed within batch file), remove 1 of % symbols each of 2 pairs.
within script file:
plot fn index 1 using 1:2 linespoints pointtype 2 linecolor rgb "green" title "leg"
if info files have "normalized" name (e.g. data1.dat
, data2.dat
...) take @ http://stackoverflow.com/a/14947085/3235496
windows bash automation gnuplot
Comments
Post a Comment