|
From: <pl...@pi...> - 2012-01-20 18:44:37
|
On 01/20/12 18:32, Ethan Merritt wrote: > On Friday, 20 January 2012, pl...@pi... wrote: >> Hi, >> >> in experiment with new iteration feature I found it does not seem to be >> applied correctly (ie usefully) to the automatic title in the key >> >> >> >> unless I explicitly set a title both plots get an identical entry in the >> legend : "dataset-".date.".dat" >> >> This would seem to render the legend key entries somewhat useless. It >> also seems illogical that it expands the filename to be plotted but does >> not expand the entry in the legend. >> >> Is this an oversight or am I missing some cunningly useful feature? > > I can see arguments either way. > > Take the very simple case > x = 5 > plot sin(x)/x > Do you expect the plot key to show "sin(x)/x" or "-0.19178"? > > Or, closer to your example, > Data(year) = "dataset-".date.".dat" > plot Data(1881) > Do you expect the plot key to show "dataset-1881.dat" or "Data(1881)"? > > > >> >> Best regards, Peter. > Ethan , I don't think you understood what I was reporting. None of those examples seems to have anything to do with iteration. What I was expecting to see was that the substitution done by for [...] would be applied to the file name and each file name would be used as the default title , as is usually the case without iteration. having a legend that looks like: "dataset-".date.".dat" "dataset-".date.".dat" "dataset-".date.".dat" "dataset-".date.".dat" is certainly of no use , so one is obliged to set it explicitly . plot for [date in "1881 1883"] "dataset-".date.".dat" tit "dataset-".date.".dat" No harm done but its a bit messy. regards. |