Re: color bar

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Thu Aug 18 2011 - 10:38:44 MDT

Hi Hongyan,

Your ispan expression only creates 19 values, but there are 20 boxes that you are trying to define in the color bar after the white color. Remember that there is always 1 more fill color than the number of contour levels. The purple color is retained from the default assignment of sequentially ascending colors starting from the beginning of the color map.

As far as lines between the color boxes are concerned, the applicable resource for controlling their width is lbBoxLineThicknessF. However, there is a minimum width determined by the pixel size of the output device, so you may not see any difference even if you set lbBoxLineThicknessF to a very small value. The other option is to make the lines disappear completely by setting lbBoxLinesOn to False.

On Aug 18, 2011, at 8:20 AM, H.Dang wrote:

> sorry, i missed a sentence. I mean the 237th color should be red, but I got dark purple.
>
> Thanks.
>
> On Thu, Aug 18, 2011 at 10:13 AM, H.Dang <danghy@gmail.com> wrote:
> Good Morning!
>
> I got some new questions about color bar, please see my plot in the attachment. I used the following setting:
>
> gsn_define_colormap(wks,"rainbow+white+gray")
> ...
> colors(7:) = ispan(165,237,4)
>
> res@lbBoxLineColor = "white"
> res@lbFillLineThicknessF = "0.8"
> res@lbLabelStride = 5
> res@cnLevels = levels
> res@cnFillColors = colors
>
> My question is: based on the color I choose, the 237th for "rainbow+white+gray", but I got deep purple for label >19.5, I've tried 238 too, the same result.
>
> And how should I do to make the white interval between different colors not so wide?
>
> Thank you.
>
> --
> Cordially,
> Hongyan(ΊθΡγ)
> Tel: 1-519-8884567ext36667
>
>
>
>
>
> --
> Cordially,
> Hongyan(ΊθΡγ)
> Tel: 1-519-8884567ext36667
>
>
> _______________________________________________
> 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 Thu Aug 18 10:38:53 2011

This archive was generated by hypermail 2.1.8 : Mon Aug 22 2011 - 08:13:37 MDT