|
From: theozh <th...@gm...> - 2017-05-25 18:29:02
|
Thanks a lot, Thomas, that's probably the shortest and most elegant way
to do it.
I was not aware that recursive functions are possible.
The following code will give only the content of the wildcard in the
title/legend/key.
### start code
BeforeWC = "Data"
AfterWC = ".dat"
FileList = system("dir /B /S ".BeforeWC."*".AfterWC)
chop(fn) = strstrt(fn,'\')?chop(fn[strstrt(fn,'\')+1:*]):fn
Wildcard(fn) = chop(fn)[strlen(BeforeWC)+1:strlen(chop(fn))-strlen(AfterWC)]
plot for [FileName in FileList] FileName u 1:2 w l title
Wildcard(FileName) noenhanced
### end code
If anybody has again a smarter solution please let me know.
Are there any chances (now or in the future) to somehow use "Regular
expressions" in gnuplot?
Thanks, Theo.
|