Re: How could I get the filling effect as the following color tab shows?

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Wed Jun 13 2012 - 11:52:27 MDT

Hi Lin,
There are a couple different ways to go about doing this. But for all of
them, you will need to manually set the cnLevels. The way I would go
about doing it:

gsn_define_colormap(wks,"BlAqGrYeOrReVi200")

res = True
......
res@cnLevelSelectionMode = "ExplicitLevels"
res@cnLevels = ispan(10,98,2) ; set the contour levels to go
from 10 to 98 by 2
colors = new(dimsizes(res@cnLevels)+1,integer)
colors = floattointeger(fspan(2,180,dimsizes(res@cnLevels)+1)) ; 2 =
blue, 180=dark red
colors(0) = 0 ; 0 = white
res@cnFillColors = colors

http://www.ncl.ucar.edu/Document/Graphics/ColorTables/BlAqGrYeOrReVi200.shtml

If you truly want the values to be shown at the end of the labelbar, see
example #14 here:
http://www.ncl.ucar.edu/Applications/labelbar.shtml#ex14

If you have any further questions please respond to ncl-talk..
Hope that helps.
Adam

On 06/13/2012 02:31 AM, xiang lin wrote:
> Hi, all
>
> I want to get the fill effect just as the following color tab
> shows, which means the values less than 10 were not filled(white color)
>
> and the values greater than 10 were filled in a way of gradual change
> of colors.
>
> ???? 2
>
> Anyone can give me some advice? Thanks!
>
>
> Regards
>
> Lin
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
______________________________________________________________
Adam Phillips                                asphilli@ucar.edu
NCAR/Climate and Global Dynamics Division       (303) 497-1726
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-talk
Received on Wed Jun 13 11:52:39 2012

This archive was generated by hypermail 2.1.8 : Fri Jun 15 2012 - 14:51:31 MDT