|
From: Theo H. <th...@ph...> - 2008-07-19 14:02:12
|
Lutz Maibaum wrote: > On Friday 18 July 2008 15:46:27 Ethan Merritt wrote: >> On Friday 18 July 2008 15:23:34 Lutz Maibaum wrote: >>> I have no answer to your question, but your email reminded me of a >>> feature that I think would be very nice to have, the support of >>> wildcards in filenames. > >>> plot "file[1-3]" <all your options> > >> We already have that: >> >> plot for [i=1:3] "file".i <all your options> > > Thanks, Ethan, I didn't know about plot iterations. It seems like they are > limited to integers, are there any plans to allow iterations over string > lists? It would be great if one could do something like > > plot for (filename in test*.dat) i <all your options> > > or at least > > plot for (filename in `ls test*.dat`) i <all your options> > > Right now it seems like I would have to do something like > > list="`ls test*.dat`" > plot for [i=1:words(list)] word(list,i) > > which actually does not work, since calling ls through backticks generates > a list with only a single item in it: > > gnuplot> !ls test*.dat > test1.dat test2.dat > gnuplot> list="`ls test*.dat`" > gnuplot> print word(list,1) > test1.dattest2.dat Using list="`echo test*.dat`" works fine here. Filenames are separated by spaces, as expected for use with word(). THeo |