[ncl-talk] Disappearing Dots (Revisited)
Rashed Mahmood
rashidcomsis at gmail.com
Tue Jan 14 12:02:28 MST 2020
Hi Barry,
There is no BIG mystery in it after all!!
The function was probably not designed to be used inside a loop, I have
changed in the attached test_arrow.ncl file. A dummy test is also attached:
There were three problematic lines( which would work outside the loop) but
not inside:
plt at arr = gsn_add_polyline(wks,plt,xpts,ypts,res)
plt at arr1 = gsn_add_polyline(wks,plt,xpts1,ypts1,resp)
plt at arr2 = gsn_add_polyline(wks,plt,xpts2,ypts2,resp)
Note that the syntax "plt at arr" would be fine for plotting individual plots
separately however when used in loop this would need to be something
different, below is what I changed in the attached test_arrow.ncl:
plt@$unique_string("tmp")$ = gsn_add_polyline(wks,plt,xpts,ypts,res)
plt@$unique_string("arr1")$ = gsn_add_polyline(wks,plt,xpts1,ypts1,resp)
plt@$unique_string("abc")$ = gsn_add_polyline(wks,plt,xpts2,ypts2,resp)
Hope that helps.
Rashed
On Tue, Jan 14, 2020 at 8:45 AM Barry Lynn <barry.h.lynn at gmail.com> wrote:
> Hi:
>
> I have a bit of a mystery:
>
> I have a loop where I am calling gsn_add_polymarker. I created an array
> (dum_b(n_calls)) so I could plot the markers within the loop.
>
> dum_b(i) = gsn_add_polymarker(wks,plot,lon_old(i),lat_old(i),mkres)
>
>
> However, when I call:
>
>
> array(i) = arrow(wks,plot,xpts,ypts,mkres)
>
>
> I am not able to make the lines with the arrows (more than once).
>
>
> warning:TransformPostDraw: tfPolyDrawList element 1 is invalid
>
>
> Yet, if I call the same with
>
>
> arr_0 = arrow...
>
>
> arr_1 = arrow...
>
>
> up to n_calls, I have no problem.
>
>
> If someone can solve the mystery, I would be curious to find out the
> reason for this "strange" behavior.
>
>
> https://www.ncl.ucar.edu/Support/talk_archives/2010/att-1344/arrow.ncl
>
> On Mon, Jul 8, 2019 at 12:13 PM Barry Lynn <barry.h.lynn at gmail.com> wrote:
>
>> Hi:
>>
>> That was absolutely the correct solution -- thank you.
>>
>> Are you aware of a way to increase the spacing between maps? I am using
>> wrf resources so this is very obtuse.
>>
>> Barry
>>
>> On Mon, Jul 8, 2019 at 10:44 AM Rashed Mahmood <rashidcomsis at gmail.com>
>> wrote:
>>
>>> Hi Barry,
>>> A quick look suggests that it may be related to not specifying unique
>>> ids for markid and textid:
>>> markid = gsn_add_polymarker(wks,plots(0),lon,lat,mkres)
>>> textid = gsn_add_text(wks,plots(0),cities,lon,lat,txres)
>>>
>>> Next lines should have,
>>> markid*1 *= gsn_add_polymarker(wks,plots(0),lon,lat,mkres)
>>> textid*1* = gsn_add_text(wks,plots(0),cities,lon,lat,txres)
>>>
>>> and so on...
>>>
>>> Cheers
>>>
>>> Rashed
>>>
>>>
>>> On Mon, Jul 8, 2019 at 7:51 AM Barry Lynn via ncl-talk <
>>> ncl-talk at ucar.edu> wrote:
>>>
>>>> Hello:
>>>>
>>>> For some reason, the markid only appears on the last graph, but not the
>>>> first two. Yet, the "call" to each is the same. I had this problem in
>>>> other programs I wrote.
>>>>
>>>> If you have a suggestion, thank you,
>>>>
>>>> Barry
>>>> --
>>>> Barry H. Lynn, Ph.D
>>>> Senior Associate Scientist, Lecturer,
>>>> The Institute of the Earth Science,
>>>> The Hebrew University of Jerusalem,
>>>> Givat Ram, Jerusalem 91904, Israel
>>>> Tel: 972 547 231 170
>>>> Fax: (972)-25662581
>>>>
>>>> C.E.O, Weather It Is, LTD
>>>> Weather and Climate Focus
>>>> http://weather-it-is.com
>>>> Jerusalem, Israel
>>>> Local: 02 930 9525
>>>> Cell: 054 7 231 170
>>>> Int-IS: x972 2 930 9525
>>>>
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> ncl-talk at ucar.edu
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>> --
>> Barry H. Lynn, Ph.D
>> Senior Associate Scientist, Lecturer,
>> The Institute of the Earth Science,
>> The Hebrew University of Jerusalem,
>> Givat Ram, Jerusalem 91904, Israel
>> Tel: 972 547 231 170
>> Fax: (972)-25662581
>>
>> C.E.O, Weather It Is, LTD
>> Weather and Climate Focus
>> http://weather-it-is.com
>> Jerusalem, Israel
>> Local: 02 930 9525
>> Cell: 054 7 231 170
>> Int-IS: x972 2 930 9525
>>
>>
>
> --
> Barry H. Lynn, Ph.D
> Senior Associate Scientist, Lecturer,
> The Institute of the Earth Science,
> The Hebrew University of Jerusalem,
> Givat Ram, Jerusalem 91904, Israel
> Tel: 972 547 231 170
> Fax: (972)-25662581
>
> C.E.O, Weather It Is, LTD
> Weather and Climate Focus
> http://weather-it-is.com
> Jerusalem, Israel
> Local: 02 930 9525
> Cell: 054 7 231 170
> Int-IS: x972 2 930 9525
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200114/d27b2d4d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_arrow.ncl
Type: application/octet-stream
Size: 2351 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200114/d27b2d4d/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dum_arrow.pdf
Type: application/pdf
Size: 64408 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200114/d27b2d4d/attachment.pdf>
More information about the ncl-talk
mailing list