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) ; ; The color map for the second X11 is different than the first, ; so we need to set the font color again. Doing this forces NCL ; to do a color table look-up again, so the text string will be ; blue and not red (as it was in colorbad.ncl). ; setvalues text "txFontColor" : "blue" end setvalues draw(text) ; Draw the text object. frame(wks2) ; Advance the frame. end