; ; The max1*ncl series of scripts show how setting gsnMaximize to ; True affects your plot, along with setting view port resources that ; change the size and position of your plot in the frame. ; ; Note that gsnMaximize *will* preserve the aspect ratio of your plot. ; ; There are other scripts in this directory that set ; gsnMaximize to True, so you can also look at them as well. ; begin y = sin(0.0628*ispan(0,100,1)) ; Generate a curve with 101 points. wks = gsn_open_wks("png","max1b") ; Open a png file called "max1b.png". res = True res@xyLineThicknessF = 3 ; 3x as thick res@gsnMaximize = True ; Maximize plot in frame. res@vpXF = 0.25 ; Set some viewport resources res@vpYF = 0.60 ; to reposition and resize the res@vpWidthF = 0.7 ; XY plot. res@vpHeightF = 0.4 ; Plot will be wider than its height. plot = gsn_csm_y(wks,y,res) ; Draw the plot. end