; ; Contour plot exercise 8. ; begin z = generate_2d_array(15,15,-10.,110.,0,(/40,40/)) wks = gsn_open_wks("x11","contour_ex08") ; 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 res@cnFillOn = True ; Turn on contour fill cmap = read_colormap_file("BlueYellowRed") cmap(129:191,3) = 0.75 ; Make some colors 3/4 transparent cmap(192:,3) = 0.50 ; Make some colors 1/2 transparent res@cnFillPalette = cmap(129:,:) ; Start at first yellow 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