begin ; ; Open the first X11 window. ; wks1 = create "wks1" xWorkstationClass defaultapp "wkColorMap" : (/"white","black","blue","red","green"/) end create ; ; Create a text object. ; text = create "text" textItemClass wks1 "txString" : ":F26:This text string should be blue" "txFontColor" : "blue" end create draw(text) ; Draw the text object. frame(wks1) ; Advance the frame. ; ; Open the second X11 window. ; wks2 = create "wks2" xWorkstationClass defaultapp "wkColorMap" : (/"white","black","red","green","blue"/) end create ; ; Change the text object to draw to the second X11 window. ; NhlChangeWorkstation(text,wks2) ; ; Note that when we draw the string the second time, it will be red ; instead of blue. This is because when we set the font color to blue ; above, NCL did a color table look-up to get the color index value that ; matches blue the closest ('2' in this case). When the workstation is ; changed, the color look-up is not done again, so color index '2' is ; still used for the font color, which is red in the second workstation. ; draw(text) ; Draw the text object. frame(wks2) ; Advance the frame. end