Display

Hello,
need some help on generating multiple plots and export.

tried to use

function plot()

string wavenames = wavelist("*",";","")
string waveno1 , waveno2, waveno3
wave wave1, wave2, wave3
variable i
for (i=0;i<itemsinlist(wavenames,";"); i=i+1)
waveno1 = stringfromlist(i,wavenames,";")
waveno2= waveno1 +"#1"
waveno3 = waveno1+ "#2"


wave wave1 = $waveno1
wave wave2 = $waveno2
wave wave3= $waveno3


display  wave1 vs timeline

endfor

end

but cannot get to work.

Can Display not accept a 'reference name' but only the exact real wave name?

Thanks!
Hi,

When I compile your function I get an error because Timeline is not defined.

To test I cobbled this test and it compiles and executes ok. So I am guessing the error is in the definition or lack thereof of timeline.
Function plotit(What,bywhat)
    string What,bywhat
   
    Wave w = $what
    Wave w2 = $bywhat
   
    display W vs w2
End



Andy
Thank you Andy!

I changed

display wave1 vs Timeline


into
display $waveno1 vs Timeline


and it worked. Seems here that only $waveno1 can be accepted but not wave1 and I don't know why (confused)

Timeline is a wave that is already existent in my data folder, and I thought I can use without referencing. Can I?
mwpro wrote:
...

and it worked. Seems here that only $waveno1 can be accepted but not wave1 and I don't know why (confused)

Timeline is a wave that is already existent in my data folder, and I thought I can use without referencing. Can I?


Remove the first declaration of wave wave1, wave2, wave3. I believe it may "confuse" the issue to declare the waves twice.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
I think you confuse wave and trace names. The "#" is not allowed in a 'normal' wave name and denotes copies of traces or subwindows in this context. (The underline character "_" would be a good substitute)

Maybe have a look at
displayhelptopic "User-defined Trace Names"

If you want do achieve something different, let us know.

HJ