Re: adding arrow head at the and of the polyline

From: Arindam Chakraborty <arch_at_nyahnyahspammersnyahnyah>
Date: Fri May 07 2010 - 13:32:43 MDT

hi Ufuk,
 here's a function attached which can draw an arrow on a plot given the start
and end points of the line. The calling syntax is exactly the same as
gsn_add_polyline(). One example is also there showing the usage. You can
change the values of fhead and asp variables inside the function to change the
shape and size of the arrow head. Ideally those (and possibly line type/color
etc) should be options of the function, which can be implemented to make
arrow() a general function to use.

Hope this solves your problem.

regards,

arndam

--
ARINDAM CHAKRABORTY
---------- Original Message -----------
From: Mary Haley <haley@ucar.edu>
To: u.utku.turuncoglu@be.itu.edu.tr
Cc: ncl-talk@ucar.edu
Sent: Fri, 7 May 2010 10:34:42 -0600
Subject: Re: adding arrow head at the and of the polyline
> Hi Ufuk,
> 
> We have some routines for drawing straight vectors if that's what 
> you need. See examples 7 and 8 on this page:
> 
> http://www.ncl.ucar.edu/Applications/weather_sym.shtml
> 
> If you are talking about adding an arrow head on the end of a non-
> straight polyline, then I'm afraid we don't have any code for this.
> 
> You're right that it could be doable, but you would have to 
> calculate the angle that you want for the arrow heads.
> 
> Of course, we do have curly vectors, but this is only in the context 
> of creating a vector plot.
> 
> I'll add a ticket for this.
> 
> --Mary
> 
> On May 6, 2010, at 9:10 AM, u.utku.turuncoglu@be.itu.edu.tr wrote:
> 
> > Hi,
> > 
> > I want to add an arrow head to show the direction of a line. The line is
> > also plotted using polyline NCL function and x and y pairs of the
> > coordinates. Is there any way to do it? I think that it requires some
> > geometric calculation to position arrow head in the flow direction. May be
> > somebody does it already.
> > 
> > Thanks,
> > 
> > --ufuk
> > 
> > 
> > -- 
> > This message has been scanned for viruses and
> > dangerous content by MailScanner, and is
> > believed to be clean.
> > 
> > _______________________________________________
> > 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
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
------- End of Original Message -------
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Received on Fri May 7 13:21:09 2010

This archive was generated by hypermail 2.1.8 : Wed May 26 2010 - 10:39:13 MDT