[ncl-talk] dividing color map to intervals

Adam Phillips asphilli at ucar.edu
Mon Nov 25 15:50:53 MST 2019


Hi Mark,
By default NCL should span the entire colormap range when plotting. If you
want more control of range of colors in the colormap that NCL uses, Instead
of using gsn_define_colormap you could use a combination of
read_colormap_file and the cnFillPalette resource.
See the text at the top of the Color Fill Example page here:
http://www.ncl.ucar.edu/Applications/color.shtml

If you have any further questions please respond to the ncl-talk email list.
Adam



On Thu, Nov 21, 2019 at 8:11 PM M P via ncl-talk <ncl-talk at ucar.edu> wrote:

> Hello,
> I define a colormap as
>
> gsn_define_colormap(wks,"WhiteBlueGreenYellowRed")
>
> I want to divide it into e.g. 20 equal intervals so I can plot data in
> different ranges
> with different colors.
>
> Can you help how to e.g. create an array colors[i] that would span the
> whole range? Or there is another way to do it?
>
> Thanks,
> Mark
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk



-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191125/3e984cb0/attachment.html>


More information about the ncl-talk mailing list