Hi Xianglei,
When you set your colormap to the BlueRed colormap, and then ask NCL to
grab the color green, NCL will try to get the color in your colormap
closest to green. In your case that would be black. There are two
possible solutions to this:
1) Use the function NhlNewColor to add the color green to your colormap.
gsn_define_colormap(wks,"BlueRed")
newcolor = NhlNewColor(wks,0.,1.0,0.)
http://www.ncl.ucar.edu/Document/Functions/Built-in/NhlNewColor.shtml
2) Merge another colormap that has green in it with the BlueRed colormap
using gsn_merge_colormaps:
http://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_merge_colormaps.shtml
Specifically, refer to the first example. Instead of specifiying gray
colors specify a green color or two. Remember that NCL has a 256 color
limit, so in your case you can only add 2 colors to your colormap..
Good luck,
Adam
Xianglei Huang wrote:
> Hi All,
>
> I am trying to use gsn_csm_streamline_contour_map_ce to creat a
> color contour plot overlapped with a streamline vector plot. I found
> that, after I choose colormap for contour plot, I cannot set the color
> of the streamlines as I want. For example, if I set
> gsn_define_colormap(wks,"BlueRed")
>
> And then if I try to plot streamlines in green by
> res_at_stLineColor = "green1"
>
> It will only plot out the streamlines in black. I tried other named
> color as well, the only color working as named is "white". All others
> cannot be plotted as named.
>
> Anyone know how I can go around this? Your help will be highly
> appreciated. Thanks.
>
> Xianglei
>
> -------------------------------------------------
> Xianglei Huang
> Princeton AOS Postdoctoral Research Associate
> NOAA Geophysical Fluid Dynamics Laboratory
> Princeton University Forrestal Campus
> 201 Forrestal Road
> Princeton, NJ 08540
>
> xianglei.huang_at_noaa.gov, xianglei_at_princeton.edu
> 609-452-6500 extension 6951 (office)
> 609-987-5063 (fax)
> http://www.princeton.edu/~xianglei
> -------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-- -------------------------------------------------------------- Adam Phillips asphilli_at_ucar.edu National Center for Atmospheric Research tel: (303) 497-1726 ESSL/CGD/CAS fax: (303) 497-1333 P.O. Box 3000 Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli _______________________________________________ ncl-talk mailing list ncl-talk_at_ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Thu Jan 19 2006 - 15:23:49 MST
This archive was generated by hypermail 2.2.0 : Fri Jan 20 2006 - 08:44:50 MST