[ncl-talk] no background color for gsn_csm_streamline_contour_map

Mary Haley haley at ucar.edu
Thu Jan 22 07:55:03 MST 2015


Hi Xiaoming,

In general, I recommend not using the gsn_csm_streamline_contour_map
function, because it's harder to control the order of everything that gets
drawn.

I suggest something like this:

streamline_plot = gsn_csm_streamline(wks,u,v,stres)
contour_plot    = gsn_csm_contour_map(wks,x,cnres)

overlay(contour_plot, streamline_plot)
draw(contour_plot)
frame(wks)

You will need to split up your current "res" resource list to those that
contain contour and map resources (cnres), and those that contain just
streamline resources (stres).

Good luck,

--Mary


   - call gsn_streamline to generate the streamlines
   - call gsn_csm_contour_map to generate the contours over a map
   - overlay(


On Thu, Jan 22, 2015 at 7:25 AM, xiaoming Hu <yuanfangcan at hotmail.com>
wrote:

> Karin
>
> Thanks a lot.  I added
>
>   res at gsnDraw      = False
>   res at gsnFrame     = False
> before   plot                 = gsn_csm_streamline_contour_map(wks,u,v,x,res)
>
> and
>
>   draw(plot)
>   frame(wks)
> after.
>
> But I still do not see the background contour.
> The interesting thing is that the colour bar for the background contour is
> drawn, but not the contour itself.
>
> Thanks!
> Xiaoming
>
>
> ------------------------------
> Date: Thu, 22 Jan 2015 13:47:11 +0100
> From: meier-fleischer at dkrz.de
> To: ncl-talk at ucar.edu
> Subject: Re: [ncl-talk] no background color for
> gsn_csm_streamline_contour_map
>
>
> Hi Xiaoming,
>
> you should set
>
>   res at gsnDraw      = False
>   res at gsnFrame     = False
>
>
> if not set to False, the streamline plot will overwrite the contour map.
>
> Bye,
> Karin
>
> Am 22.01.15 um 00:38 schrieb xiaoming Hu:
>
>    Hello
> I would like to overlay streamline on terrain height using
> gsn_csm_streamline_contour_map.
> But I only get streamline, but no terrain height. See the following
> figure.
> Anybody knows what is happening? I attached my ncl script.
>
> Thanks a lot
>
> Xiaoming
>
>
> _______________________________________________
> 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
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150122/71ab1ca8/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ATT00002
Type: image/png
Size: 36653 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150122/71ab1ca8/attachment.png 


More information about the ncl-talk mailing list