Re: MinMax labelbar

From: Andrew Dawson <andrew.dawson_at_nyahnyahspammersnyahnyah>
Date: Wed Dec 01 2010 - 01:19:36 MST

You need to tell NCL not to use automatic levels by setting:

res2@cnLevelSelectionMode = "ManualLevels"

See the link below for the details:

http://ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLevelSelectionMode

Cheers,
Andrew

On 1 December 2010 07:33, Siswanto <siswanto@bmkg.go.id> wrote:

>
> Dear all,
>
> I would like to plot a seasonal map of sea surface temperature over
> Indonesia.
> The was no problem in my routine, and the results look OK. However the plot
> reproduced a difference range label bar for every period (what I want is
> between 20-30 C). Although I had defined the contour level "cnMinLevelValF
> and cnMaxlevelValF", but the change does not appear.
> Any suggestion (in which part should I modify) would be very apreciated.
> The routine to plot is attached.
>
> Thank you
>
> Best, Siswanto
>
>
> wks = gsn_open_wks("ps" ,"SST_INA_SEASONAL-CLIMATE_SODA") ; open
> ps file
> plot2 = new(4,"graphic") ; create graphic array
> pres2 = True ; mod panel plot
> pres2@gsnDraw= True
> pres2@gsnFrame=False
> pres2@gsnMaximize = True ; blow up plot
> pres2@gsnPaperWidth=8.5
> pres2@gsnPaperHeight=11.0
> pres2@txString = "INDONESIA SST- SODA (Int 47 Years)"
> pres2@txFontHeightF = .012
> pres2@gsnPaperOrientation="portrait"
> pres2@gsnPaperMargin=0.01
> pres2@gsnPanelLeft = 0.01
> pres2@gsnPanelRight = 0.99
> pres2@gsnPanelBottom = .01
> pres2@gsnPanelTop = .95
> pres2@gsnPanelYWhiteSpacePercent = 3
> pres2@gsnPanelXWhiteSpacePercent = 3
>
>
> res2 = True ; plot mods desired
> res2@gsnDraw = False ; don't draw
> res2@gsnFrame = False ; don't advance frame
> res2@gsnAddCyclic = False ; regional data
> res2@mpMinLatF = -15.0 ; only plot 20S to 20N
> res2@mpMaxLatF = 15.0
> res2@mpCenterLonF = 115. ; center plot at 180
> res2@mpMinLonF = 90.
> res2@mpMaxLonF = 145.
> gsn_define_colormap(wks,"gui_default")
> res2@cnFillOn = True ; turn on color
> res2@tmXBOn = True ; eliminate bottom labels
> res2@tmXTOn = False ; eliminate bottom labels
> res2@tmYROn = False ; eliminate bottom labels
> res2@cnLinesOn = False ; False = no contour lines
> res2@cnMonoLineDashPattern = False
> res2@cnLineLabelsOn = True
> res2@gsnStringFontHeightF = .03
> res2@gsnLeftString = ""
> res2@gsnRightString = ""
> res2@mpLandFillColor= "black"
> res2@mpOceanFillColor=-1
> res2@cnInfoLabelOn = True
> ;res2@cnLineLabelPlacementMode = "computed"
> res2@lbLabelBarOn = True
> res2@pmLabelBarDisplayMode = True
> res2@lbLabelStride = 2 ; label bar stride
> res2@lbLabelFontHeightF = 0.01
>
> res2@cnMinLevelValF = 20.0 ; set min contour level
> res2@cnMaxLevelValF = 30.0 ; set max contour level
> res2@cnLevelSpacingF = 0.5 ; set contour spacing
> res2@gsnCenterString = "SST Average-DJF"
> plot2(0) = gsn_csm_contour_map(wks,sst_DJF, res2)
>
> res2@gsnCenterString = "SST Average-JJA"
> plot2(1) = gsn_csm_contour_map(wks,sst_JJA, res2)
>
> res2@gsnCenterString = "SST Average-MAM"
> plot2(2) = gsn_csm_contour_map(wks,sst_MAM, res2)
>
> res2@gsnCenterString = "SST Average-SON"
> plot2(3) = gsn_csm_contour_map(wks,sst_SON, res2)
>
> gsn_panel(wks,plot2,(/2,2/),pres2)
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Dec 1 01:19:44 2010

This archive was generated by hypermail 2.1.8 : Wed Dec 01 2010 - 08:48:58 MST