; ; Contour plot exercise 2. ; begin z = generate_2d_array(15,15,-10.,110.,0,(/40,40/)) wks = gsn_open_wks("x11","contour_ex02") ; 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@cnLineThicknessF = 3 ; 3x default line thickness res@cnMonoLineColor = False ; Use multiple colors res@cnLineColors = toint(fspan(2,238,19)) ; Define the colors ; ; Note: it is generally better to use named colors instead of ; color index values. See example "contour_ex02_namedcolors.ncl". ; plot = gsn_csm_contour(wks,z,res) end