Re: wrong color vectors

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu Jan 21 2010 - 12:29:01 MST

Hi Nicole,
You are setting resbvect@vcLineArrowColor = (/0.8,0.8,0.8/), which is
equivalent to the color gray80 (a light gray). Looking at your colormap
setup, gray80 is not present, although gray50 is:

   gsn_define_colormap(wsplot,"BlWhRe") ; sets your colormap to
BlWhRe
   gsn_reverse_colormap(wsplot)
   newc1 = NhlNewColor(wsplot,0.5,0.5,0.5) ; adds gray50 to the
colormap
   newc2 = NhlNewColor(wsplot,0,0,0) ; adds black to colormap
   newc3 = NhlNewColor(wsplot,0.5,0.5,0.5)

The newc2 and newc3 lines aren't necessary, as they add black (already
present in the BlWhRe colormap) and again add gray50.

When you request a color that isn't in your colormap, NCL will try to
choose the color that it thinks is closest to the one you want. In this
case when you requested gray80 it chose a light red.

Try setting this:
newc2 = NhlNewColor(wsplot,.8,.8,.8)

and I bet the vectors will get colored correctly..
Hope that helps..
Adam

On 01/21/2010 12:06 PM, Nicole Schiffer wrote:
> I'm attempting to make grey vectors using resbvect@vcLineArrowColor, but
> they are showing up as light red. I've checked that the resources are
> correctly matched to the variables in plotting. Any other ideas? The
> script is attached. Thanks.
>
> Nicole
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> * Nicole Schiffer
> * Graduate Research Assistant
> * Department of Atmospheric Sciences
> * University of Illinois, Urbana-Champaign
> * Email: nschiff2 [at] illinois [dot] edu
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
> _______________________________________________
> 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-talk
Received on Thu Jan 21 12:29:08 2010

This archive was generated by hypermail 2.1.8 : Thu Jan 21 2010 - 13:54:45 MST