;---------------------------------------------------------------------- ; This script demonstrates the use of function codes to draw a giant ; red heart. ; ; This graphic is NOT used in the Graphics workshop lecture slides. ;---------------------------------------------------------------------- begin wks = gsn_open_wks("png","heart") ; Open "heart.png" PostScript file. heart_str = "~F35~r~F~" ; Use function code to change to font ; table 35, where "r" is a filled heart. ; shamrock_str = "~F35~p~F~" ; This draws a shamrock. res = True res@gsnMaximize = True ; This will make heart pretty big. res@txFontColor = "red" ; Change font color gsn_text_ndc(wks,heart_str,0.5,0.5,res) ; Draw string in viewport. frame(wks) ; Advance the frame. end