traceNameList omits Errorbar traces

Hello Igorverse,

I have created a button to close and kill multiple waves displayed in a graph with the following code

string nameOfWindow=winname(0,1)
string tracenames=traceNameList(nameOfWindow,";",1)
killwindow/z $nameOfWindow

where killwlist(list) loops through a list of wave names and kills them.

I just noticed that traceNameList does not list waves that are used as error bars on the graph. Is there a way to do this? It doesn't appear to be an option in the optionsFlag... is there a bit parameter that does this and if not can it be added to the wish list?


Thanks for the help 


If all your waves are in the same dataFolder then you can use WaveList. Also, be aware that TraceNames are not necessarily WaveNames.

Here is a quick demo that may help:

Function test()
    Make/D/O/N=(10) wData1, wData2, wData3, wErr
    wData1[] = gnoise(10) + 30
    wData2[] = gnoise(10) + 30
    wData3[] = gnoise(10) + 30
    wErr[] = sqrt(abs(wData1[p]))
    Display wData1, wData2
    AppendToGraph wData3/TN=MoreData
    ModifyGraph mode=3,marker=1
    ErrorBars wData1 Y,wave=(wErr,wErr)
    ModifyGraph rgb(wData2)=(0,52224,0)
    ModifyGraph rgb(MoreData)=(0,0,65280)
    print "TraceList:"+TraceNameList("", ";", 1)
    print "WaveList:"+WaveList("*", ";", "WIN:")

Good luck.

TraceNameList does not list waves, it lists traces. Error bar waves are not traces. The fact that you are able to kill your waves using the trace names is kind of an accident dependent on the fact that trace names are derived from wave names.

WaveList("*", ";", "WIN:yourgraphname") will get a list of waves *in the current datafolder* that are also in your graph.

GetWindow yourgraphname, wavelist will create a text wave containing the names of all the waves in your graph. The relative datafolder path is in column 1 of the wave.