[ncl-talk] Adding arrow head at the and of the polylines

Mary Haley haley at ucar.edu
Mon Jun 19 11:33:44 MDT 2017


Chang,

This is a user-donated function that I am unfamiliar with.

The code seems straight-forward enough.  If the head is simply at the wrong
end of the vector, then you should be able to change arrow.ncl to swap
which end the head is considered to be.

If you are trying to create a pressure/latitutde plot with vectors, then
you may want to look into gsn_csm_pres_hgt_vector. This requires that you
have a 2D array of U and V values which you will need to seed with your own
values:

http://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_pres_hgt_vector.shtml

--Mary


On Mon, Jun 19, 2017 at 10:19 AM, Xi Chang <xi.chang01 at gmail.com> wrote:

> Hi Mary and NCL,
>
> The script for the arrow-head can only work in the X and Y are in
> cartesian coordinate. It did NOT work when *X is the latitude and Y is
> the height* (hPa), the head of the vector is placed wrongly when I used
> "polylines" function. Can you help me with this issue?
>
> Best,
>
> Chang
>
>
>
>
>
> On Thu, May 11, 2017 at 3:42 PM, Mary Haley <haley at ucar.edu> wrote:
>
>> Xi,
>>
>> I don't think we have any examples of this, but I typed "arrow polyline"
>> in the search box of the NCL home page, and found this post by Arindam
>> Chakraborty:
>>
>> https://www.ncl.ucar.edu/Support/talk_archives/2010/1344.html
>>
>> I've attached the arrow.ncl script that he included in that post. You
>> should be able to run it as-is.
>>
>> --Mary
>>
>>
>> On Wed, May 10, 2017 at 5:28 PM, Xi Chang <xi.chang01 at gmail.com> wrote:
>>
>>> Dear NCL,
>>>
>>> Is there any a function to add an arrow head to show the direction of a
>>> line (using polylines)?
>>> Thanks a lot,
>>>
>>> Best,
>>> Xi
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> 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/20170619/8242c27f/attachment.html 


More information about the ncl-talk mailing list