Naming A Graph

To name a graph (not to give a title) one can use, for example

display/N=graphy wave0

what if one wants to create graphs with variable (given by user) names, for example

Macro brush(wname,gname)
String wname, gname
display/N=gname $wname
End

Such a macro gives an error message saying that 'expected a name found a variable'.


You need to use the $ operator to do string substitution. So, this should work:
Macro brush(wname,gname)
     String wname, gname
     display/N=$(gname) $wname
End