begin x = ispan(-50,50,1) ; 101 points (-50,-49,...,49,50) y = sin(0.0628*x) wks = gsn_open_wks("png","xy1f") ; Open a png file called "xy1f.png". res = True ; Create a variable to hold plot resources. res@xyLineColor = "Blue" ; Line color (case insensitive) res@xyLineThicknessF = 2 ; 2x as thick as default res@xyDashPattern = 3 ; Line dash pattern 0 is default (solid) res@tiMainString = "This is a main string" ; Main title res@tiXAxisString = "X Values" ; X axis title res@tiYAxisString = "Y Values" ; Y axis title res@trYMinF = min(y) ; Set axes limits for res@trYMaxF = max(y) ; both Y and res@trXMinF = min(x) ; X axes. res@trXMaxF = max(x) res@tmXBMode = "Explicit" ; Explicitly set the res@tmXBValues = (/-50, -25, 0, 25, 50/) ; bottom tick mark res@tmXBLabels = (/"A", "B","C", "D","E"/) ; labels. plot = gsn_csm_xy(wks,x,y,res) ; Call the gsn_csm function for drawing ; the curve. end