; ; Contour plot exercise 1. ; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" begin z = generate_2d_array(15,15,-10.,110.,0,(/40,40/)) wks = gsn_open_wks("x11","contour_ex01") ; Open X11 window res = True ; Plot options desired. res@gsnMaximize = True ; Maximize plot in frame. res@cnLevelSelectionMode = "ManualLevels" ; Manually set contour levels. res@cnMinLevelValF = 5 res@cnMaxLevelValF = 95 res@cnLevelSpacingF = 5 ; ; Note: setting the following two resources instead of the previous ; four resources will have the same effect. The method below should ; be used mainly if you have contour levels that are irregularly ; spaced. ; ; res@cnLevelSelectionMode = "ExplicitLevels" ; res@cnLevels = ispan(5,95,5) plot = gsn_csm_contour(wks,z,res) end