Re: Polymarkers masking

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Sun, 6 Jul 2008 16:48:02 -0600 (MDT)

Hi all,

Dave Brown sent an answer to Yuval offline on the polymarker question,
and I felt it was worth posting it back to ncl-talk and
pyngl-talk. (See forwarded message below.)

For the record, the PyNGL "Ngl.add_polymarker" is the equivalent of
"gsn_add_polymarker" in NCL, and "Ngl.polymarker" is the same as
"gsn_polymarker".

--Mary

---------- Forwarded message ----------
Date: Tue, 1 Jul 2008 12:47:40 -0600
From: David Brown <dbrown_at_ucar.edu>
To: Yuval Itan <y.itan_at_ucl.ac.uk>
Cc: Mary Haley <haley_at_ucar.edu>
Subject: Re: Polymarkers masking

Hi Yuval,

There are 2 options that I think will give you what you are looking for:
1) Set mpFillDrawOrder = "Draw" and cnFillDrawOrder = "PreDraw"
or
2) Use Ngl.polymarker(wks,contour,x,y,poly_res) instead of
Ngl.add_polymarker(...
but insert it after
Ngl.draw(contour)
but before
Ngl.frame(wks)

   -dave

>>>>>> On 1 Jul 2008, at 15:16, Dennis Shea wrote:
>>>>>>
>>>>>>> Take a look at:
>>>>>>> http://www.ncl.ucar.edu/Applications/station.shtml
>>>>>>> http://www.ncl.ucar.edu/Applications/polyg.shtml [Ex 3]
>>>>>>>
>>>>>>> Maybe these will help
>>>>>>>
>>>>>>> Yuval Itan wrote:
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> I created a contour map for land area only, and I would like
>>>>>>>> to add my polymarkers on. The problem is the I couldn't find
>>>>>>>> a way to draw the dots over the ocean/inland water or on
>>>>>>>> coasts- I would like to have them as full dots (masking the
>>>>>>>> water/coast, always being on the foreground), and to keep
>>>>>>>> the contour plot inland. These are the original key lines
>>>>>>>> I'm using that make everything fine except for polymarkers
>>>>>>>> that are being masked:
>>>>>>>>
>>>>>>>> mpFillDrawOrder = "PostDraw"
>>>>>>>> mpOceanFillColor = "White"
>>>>>>>> mpInlandWaterFillColor = "White"
>>>>>>>>
>>>>>>>> When I do either of the following then the contour is being
>>>>>>>> drawn on the whole area (including water), so it doesn't help:
>>>>>>>>
>>>>>>>> mpFillDrawOrder = "PreDraw" (or ="Draw"),
>>>>>>>> mpOceanFillColor = -1, mpInlandWaterFillColor = -1
>>>>>>>>
>>>>>>>> I would be grateful for any suggestion.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>
>>>
>
>
> --
> ======================================================
> Dennis J. Shea tel: 303-497-1361 |
> P.O. Box 3000 fax: 303-497-1333 |
> Climate Analysis Section |
> Climate & Global Dynamics Div. |
> National Center for Atmospheric Research |
> Boulder, CO 80307 |
> USA email: shea 'at' ucar.edu |
> ======================================================
>

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Jul 06 2008 - 16:48:02 MDT

This archive was generated by hypermail 2.2.0 : Sun Jul 06 2008 - 17:04:16 MDT