Wave name in legend when Multidimensionnal wave is displayed

Dear all,

My data are stored inside a [N,M,P] matrix where N=1000,M=3 and P=10

I display only a part of the data in a loop such as for example: "Appendtograph Data[][1][i] vs Data[][0][i]"
If I plot the legend, it displays Data#0, Data#1, etc.
That's normal, ok. BUT...
How can I change the name of the trace (I have already created a text wave where I stored the expected wave name)?

Thanks for your help
You need the /TN flag to specify the trace name.
Suggest you add a line to your code where you specify a string and then use that... e.g.
String tName = "data_" + num2str(i)
AppendToGraph/TN=tName Data[][1][i] vs Data[][0][i]

If you already have names in your textwave at the ith row
String tName = yourTextWave[i]
AppendToGraph/TN=tName Data[][1][i] vs Data[][0][i]
Thank you for your answer.
I'm sorry but the /TN option is not available for AppendToGraph in Igor 6.37 as it is explained in the manual:

AppendToGraph [/W=winName /B[=axisName ] /C=(r,g,b)/L[=axisName ] /NCAT/Q/R [=axisName ] /T[=axisName ]/VERT] waveName [, waveName ] ... [vs xwaveName ]<\code>

Could you help me please?
To append a trace of wave0 to top graph:

string trace_name = "name"
AppendToGraph wave0/TN=$trace_name


or:

display wave0/TN=$trace_name vs wave1


For more info: displayhelptopic "trace names"

_sk
mailfert wrote:

I'm sorry but the /TN option is not available for AppendToGraph in Igor 6.37 as it is explained in the manual:


Igor 6.37 supports trace names. Have a look in the manual on Page II-243 or run the online help suggested by _sk.
(srj51's example is missing the $ operator to convert a string into a name)

HJ


Thanks to everybody, you solved my problem.
Best regards and enjoy Igor Pro!