;---------------------------------------------------------------------- ; This script demonstrates the use of the trX/YMin/MaxF resources ; to change the range of the X and Y axes. ; ; This graphic is used in the Graphics workshop lecture slides. ;---------------------------------------------------------------------- begin x = ispan(-50,50,1) ; 101 points (-50,-49,...,49,50) y = sin(0.0628*x) wks = gsn_open_wks("png","xy1d_mod1") res = True ; Create a variable to hold plot resources. res@xyLineColor = "Blue" ; Line color (case insensitive) res@xyLineThicknessF = 5 ; 5x as thick as default res@trYMinF = -0.70 ; Set axes limits. res@trYMaxF = 1.2 res@trXMinF = -20 res@trXMaxF = 40 plot = gsn_csm_xy(wks,x,y,res) ; Call the gsn_csm function for drawing ; the curve. end