Hi,
Figured it out but I thought I would leave a solution if some has a need in the future.
I use child window list to get the full list of windows. Now for my purposes I remove window "P0" since that is a panel that holds the controls and not any graphs. I then append the name of the subwindow to the base name and adjust the traces in that window. In this case either colored by Z or just base color.
function colorBYcluster2(variable Choice)
string thetrace,tracelist
wave Cluster_colors,GCLM_Cluster
tracelist =childWindowList("scattercluster")
tracelist =removeFromList("P0",tracelist)
variable index,maxindex
maxindex=itemsInList(tracelist)
for(index=0;index<maxindex;index+=1)
thetrace ="scattercluster#"+StringFromList(index, tracelist)
if(choice)
ModifyGraph/w=$thetrace zColor={GCLM_cluster[*][%cluster],*,*,cindexRGB,0,Cluster_Colors}
else
ModifyGraph/w=$thetrace zColor=0
endif
endfor
end
Andy