Re: color bar for anomaly

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri Sep 14 2012 - 10:46:34 MDT

Hi Erika,

If you have NCL V6.0.0 or earlier, and you are using a colormap that has the max 256 colors (which ncl_default has), then you will be unable to use "green" as a separate color, You would have to replace one of the colors in ncl_default with green using NhlSetColor:

http://www.ncl.ucar.edu/Document/Functions/Built-in/NhlSetColor.shtml

If you download NCL V6.1.0-beta (the current version) then you can use any named color you want, without having to first add it to the existing color map.

--Mary

On Sep 14, 2012, at 5:06 AM, Erika Folova wrote:

> Hallo NCL,
>
> Thanks Marry for the suggestion, I have another problem, how can i pick my specific contour line color outside of my current color table. Let say, I want to have a contour line color in "green" using gsn_define_colormap(wks,"ncl_default") thus:
> res@cnLineColor = "green". However, It doesn't work since in order to use a named color, that color should be a part of my current color table. Any suggestion? Thanks NCL.
>
> Erika
>
>
> On Fri, Sep 14, 2012 at 5:54 AM, Mary Haley <haley@ucar.edu> wrote:
>
> It looks like the band_pass_hovmueller_plot procedure doesn't recognize your setting of cnLevels or cnLevelSelectionMode.
>
> However, it does recognize cnMinLevelValF, cnMaxLevelValF, and cnLevelSpacingF. Try setting these resources to -60, 60, and 20 respectively.
>
> --Mary
>
> On Sep 13, 2012, at 4:55 PM, Erika Folova wrote:
>
> > HI NCL User,
> >
> > I needd a little bit help.
> > I do want to produce the same color bar as attached mjoclivar_5 [same interval], for my olr anomalies data. To achieve that i have set:
> >
> > [SNIP]
> >
> > gsn_define_colormap(wks,"ncl_default")
> > --
> > res@cnLevelSelectionMode= "ExplicitLevels"
> > res@cnLevels = (/ -60, -40, -20, 0, 20, 40, 60/)
> > res@gsnSpreadColors = True
> > res@lbLabelStride = 1
> > res@lbOrientation = "vertical"
> >
> > But it did not produce what i expected. can you help me a little bit.
> >
> > Erika,
> > <mjoclivar_5_lg.png>_______________________________________________
> > 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

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Sep 14 10:46:42 2012

This archive was generated by hypermail 2.1.8 : Fri Sep 21 2012 - 16:22:30 MDT