load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" begin cdf_file = addfile("$NCARG_ROOT/lib/ncarg/data/cdf/contour.cdf","r") Z = cdf_file->Z(0,0,:,:) ; geopotential height wks = gsn_open_wks("ncgm","spread_colors_rev") ; Open an ncgm. gsn_define_colormap(wks,"temp1") ; Use a rainbow color map that ; has 63 colors and goes from ; gray to blue to red. cnres = True cnres@gsnDraw = False ; Don't draw, because we're cnres@gsnFrame = False ; going to panel later. cnres@cnFillOn = True ; Turn on contour fill. cnres@cnInfoLabelOn = False ; Turn off info label. cnres@pmLabelBarDisplayMode = True ; Turn on labelbar. cnres@lbPerimOn = False ; Turn off labelbar perimeter. cnres@gsnSpreadColors = True ; Spread the colors cnres@tiMainString = "regular colors" plot1 = gsn_contour(wks,Z,cnres) ; Create a filled contour plot. Note ; that the contour colors go from ; from red to blue to gray. cnres@gsnSpreadColorStart = -1 ; Start with last color. cnres@gsnSpreadColorEnd = 2 ; End with second color. cnres@tiMainString = "reversed colors" plot2 = gsn_contour(wks,Z,cnres) ; Create a filled contour plot. Note ; that the contour colors now span ; from red to blue to gray. gsn_panel(wks,(/plot1,plot2/),(/2,1/),False) end