Re: Help: About named colors -- Where is "DarkGreen" or "SeaGreen" or "SpringGreen4" ?

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Sun, 25 Nov 2007 07:07:52 -0700 (MST)

To elaborate on Dennis' answer, when you reference a named color and
it is not in your current color map, you will get the next closest
color that can be found. This may yield unexpected results.

The most common problem we see here is when somebody is using one of
the gsn_csm_xxxx_map examples, which try to fill the land areas in
light gray. If you change your color map to one that doesn't have any
shades of gray in it, then the land masses will be filled in with the
closest thing it can find to gray. This might be pink. :^)

The solution, here, by the way, is to explicitly add gray to your
color map, *after* you've changed the color map:

    igray = NhlNewColor(wks,0.7,0.7,0.7)

--Mary

On Thu, 22 Nov 2007, Dennis Shea wrote:

> NCL graphics are based on are GKS standard.
> Each workstation has one color map associated with it.
> The default color map does not have any of the colors
> you specified. Hence, you do not get the reqiested colors.
>
> http://www.ncl.ucar.edu/Applications/color.shtml
> See Example 4
>
> Good luck
>
>
> lxf wrote:
>> Hi,
>> Today, I can't get "DarkGreen" "SeaGreen" and "SpringGreen4" when I draw color pictures.
>> To simplify my question, I use the following scripts and can't see the color as in http://www.ncl.ucar.edu/Document/Graphics/named_colors.shtml :
>>
>> ;========================================================
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>>
>> begin
>> x = ispan(1,100,1)*1.
>> y = 50*cos(x*2*3.1415926/30.)
>>
>> wks = gsn_open_wks("x11","xy") ; Open an ps workstation.
>> res = True
>> res_at_gsnYRefLine = 20
>>
>> ;res_at_gsnAboveYRefLineColor = "SeaGreen"
>> res_at_gsnAboveYRefLineColor = "DarkGreen"
>> ;res_at_gsnAboveYRefLineColor = "SpringGreen4"
>>
>> plot = gsn_csm_xy(wks,x,y,res)
>> end
>> ;========================================================
>>
>> Can someone hlep me?
>>
>> Best regards,
>> Li
>> 2007-11-22
>>
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk_at_ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Nov 25 2007 - 07:07:52 MST

This archive was generated by hypermail 2.2.0 : Sun Nov 25 2007 - 07:21:25 MST