Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

arrows at both ends of a line?

56 views
Skip to first unread message

Daniel Nettels

unread,
Apr 8, 2003, 3:08:34 AM4/8/03
to
Hi

How can I draw arrows at both and of a line?

Daniel Nettels


Jens-Peer Kuska

unread,
Apr 9, 2003, 1:29:05 AM4/9/03
to
Hi,

no but you can draw two arrows
with oposite directions

Needs["Graphics`Arrow`"]

Show[
Graphics[
{Arrow[{0, 0}, {1, 1}],
Arrow[{1, 1}, {0, 0}]}]]

Regards
Jens

Florian Jaccard

unread,
Apr 9, 2003, 1:33:09 AM4/9/03
to
Here a little example :


points = {{1, 1}, {3, 1}, {5, 5}};


<< "Graphics`Arrow`"


arr[liste_] := {Arrow[liste[[-2]], liste[[-1]]],
Arrow[liste[[2]], liste[[1]]]}


Show[Graphics[arr[points]]];

Meilleures salutations

Florian Jaccard


-----Message d'origine-----
De : Daniel Nettels [mailto:Daniel....@unifr.ch]
Envoyé : mar., 8. avril 2003 09:03
À : math...@smc.vnet.net
Objet : arrows at both ends of a line?

Daniel Nettels

unread,
Apr 9, 2003, 1:42:47 AM4/9/03
to
Hi

Several people suggested me to draw to opposit arrows of same length.
However this does not give a nice result, since now the tip of one
arrow is superposed with the recatangular end of the other.
This becomes apparent if one increase the thickness of the line as in
the following example:

points={{1,1},{3,1}};


<<"Graphics`Arrow`"
arr[liste_]:={Arrow[liste[[-2]],liste[[-1]]],Arrow[liste[[2]],liste[[1]]]}

Show[Graphics[{AbsoluteThickness[10],arr[points]}]];

Thanks for further help.

Daniel

German Buitrago A.

unread,
Apr 9, 2003, 1:49:01 AM4/9/03
to
Daniel,

Use the standard package Graphics`Arrow`

German Buitrago A.
Manizales, Colombia

Bill Rowe

unread,
Apr 9, 2003, 1:57:20 AM4/9/03
to
On 4/8/03 at 3:03 AM, Daniel....@unifr.ch (Daniel Nettels) wrote:

>How can I draw arrows at both and of a line?

Try

<< Graphics`Arrow`;
Show[Graphics[Line[{{0, 0}, { 0, 1}}]],
Epilog -> {Arrow[{0, .9}, {0, 1}], Arrow[{0, .2}, {0, 0}]}];

0 new messages