; ; Contour plot exercise 5. ; 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_ex05") ; Open X11 window gsn_define_colormap(wks,"rainbow") ; Change color map 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 res@cnFillOn = True ; Turn on contour fill res@lbOrientation = "Vertical" ; vertical labelbar res@tmXBMode = "Explicit" ; Set labels for X axis res@tmXBValues = (/ 1, 10, 20, 25, 32, 38/) res@tmXBLabels = (/"A", "B", "C", "D", "E", "F"/) res@tmYLMode = "Manual" ; Manually set tickmarks on Y axis res@tmYLTickSpacingF = 5 ; Only set spacing, not start/end plot = gsn_csm_contour(wks,z,res) end