Re: wmsetp("col", 2)

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed, 21 May 2008 09:02:08 -0600 (MDT)

Hi Ed,

This example has a bug. It creates a colormap, but then doesn't use
it. Try adding:

    gsn_define_colormap(wks,cmap)

after:

   cmap = (/(/1.,1.,1./),(/0.,0.,0./),(/1.,0.,0./) /) ; color map
   wks = gsn_open_wks("ps","weather_sym")

This colormap isn't very useful, though, because it only has three
colors.

If you are using the default color map, you should have seen red wind
barbs since color index 2 is red in this color map.

Are you setting your own color map by any chance, say in your
.hluresfile? If so, then you can try adding "red" to your current
color map (assuming that your current colormap doesn't already contain
the maximum 256 colors) and then using this index value. For example:

    red = NhlNewColor(wks,1.,0.,0.)

Then, instead of:

   wmsetp("col", 2)

use:

   wmsetp("col", red)

Finally, just an FYI: you can see what your current colormap
looks like by calling:

    gsn_draw_colormap(wks)

right after the gsn_open_wks call (and gsn_define_colormap call if you
have one).

--Mary

On Tue, 20 May 2008, Yang Yang wrote:

> Hello:
> I used script, weather_sym_3.ncl, under "Weather symbols" without any changes. The wind barbs are sopposed to be red, because wmsetp("col", 2), however, on my screen it shows black. I set wmsetp("col", 3), the wind barbs are still black. It seems that wmsetp does not work. What is wrong with it? Thanks!
> Regards
> Ed
>
>
>
> _______________________________________________
> 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 Wed May 21 2008 - 09:02:08 MDT

This archive was generated by hypermail 2.2.0 : Wed May 21 2008 - 17:47:28 MDT