Hi Xin,
Take a look at example #4 here:
http://www.ncl.ucar.edu/Applications/labelbar.shtml#ex4
A few things to note:
1) You do need to set lbLabelAlignment:
res@lbLabelAlignment = "BoxCenters" ; label orientation
2) The number of labels must be one more than the number of contour levels:
res@cnLevelSelectionMode = "ExplicitLevels"
res@cnLevels = ispan(2,13,1)
res@lbLabelStrings = (/"1","2","3","4","5","6","7","8",\
"9","10","11","12","13"/)
Make sure you are doing 2) above. Note that in the above example code
the "1" label will get placed in the color representing all those areas
less than 2, the "2" label will get placed in the color representing
those areas greater than or equal to 2 and less than 3, etc... Make sure
the results are what you would expect...
Good luck,
Adam
On 02/23/2011 11:49 AM, Xin Xi wrote:
> Hi there,
> I am having an issue on the label bar when plotting the LU_INDEX out of
> WRF terrestrial data. By default (lbLabelAlignment=InteriorEdges), there
> is one more box than the number of contour levels (in this case the # of
> land categories). This is a problem since the # of boxes should be the
> same as the # of land categories. When setting lbLabelAlignment to
> BoxCenters, there is still one more color on the label bar, with an
> unknown label string "LABEL_24". Please help.
>
> Thanks,
>
> Regards.
>
>
> --
> /Xin Xi
> School of Earth and Atmospheric Sciences
> Georgia Institute of Technology
> 311 Ferst Drive, Atlanta, GA 30332-0340/
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-- __________________________________________________ Adam Phillips asphilli@ucar.edu National Center for Atmospheric Research tel: (303) 497-1726 Climate and Global Dynamics Division fax: (303) 497-1333 P.O. Box 3000 Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Wed Feb 23 14:38:06 2011
This archive was generated by hypermail 2.1.8 : Wed Feb 23 2011 - 16:47:57 MST