Arrow

Arrow[{pt1,pt2}]

is a graphics primitive that represents an arrow from pt1 to pt2.

Arrow[{pt1,pt2},s]

represents an arrow with its ends set back from pt1 and pt2 by a distance s.

Arrow[{pt1,pt2},{s1,s2}]

sets back by s1 from pt1 and s2 from pt2.

Arrow[curve,]

represents an arrow following the specified curve.

Details

  • Arrow can be used in both Graphics and Graphics3D (two- and three-dimensional graphics).
  • The following curve specifications can be used in Graphics:
  • Line[]piecewise line segments
    BezierCurve[]composite Bezier curve
    BSplineCurve[]B-spline curve
    JoinedCurve[]joined curve object
  • The following curve specifications can be used in Graphics3D:
  • Line[]piecewise line segments
    BezierCurve[]composite Bezier curve
    BSplineCurve[]B-spline curve
    Tube[]tubed curve object
  • Arrow[Line[]] is equivalent to Arrow[]. Arrow[Tube[]] yields a 3D arrow based on a tube.
  • Arrow[{pt1,pt2,}] represents an arrow whose shaft passes through the sequence of points pti.
  • The positions of points can be specified either in ordinary coordinates as {x,y}, or in scaled coordinates as Scaled[{x,y}] or using ImageScaled or Offset. »
  • The shaft of the arrow consists of a sequence of straight segments joining the specified points.
  • Arrow[{pt1,pt2}] is drawn by default with its tail at pt1 and its head at pt2.
  • The form, orientation, and position of arrowheads can be specified by an Arrowheads directive. »
  • Graphics directives such as RGBColor or Thickness apply to both the shaft and arrowhead elements of an arrow. »
  • You can prevent directives from applying to an arrowhead by including explicit directives within the graphic used to specify the arrowhead.
  • In Arrow[{pt1,pt2},s] the setback distance s is measured in the ordinary coordinate system of the whole graphic, so that the arrow will just touch Disk[pti,s]. »
  • If the whole graphic does not have AspectRatio->Automatic, then a specified arrow setback may correspond to different distances in different directions in the graphic.

Examples

open allclose all

Basic Examples  (6)

A 2D arrow primitive:

A 3D arrow primitive:

A full 3D arrow primitive using tubes:

Curved arrows:

Double-headed arrows:

Differently styled 2D arrows:

Scope  (17)

Arrow Specification  (7)

Straight arrow:

Jagged arrow:

Line and tube arrows:

Curved arrows:

Multiple disconnected arrows:

Specify the setback distance for 2D arrows:

For curved arrows:

Specify the setback distance for 3D arrows with line shaft:

Arrow Styling  (7)

Arrows with different thicknesses:

Dashed arrows:

Colored arrows:

Two-dimensional arrows with different sizes of arrowheads:

Three-dimensional arrows with different sizes of arrowheads:

Graphics can be used as an arrowhead for 2D and 3D arrows:

Use Graphics3D to specify the arrowhead:

Coordinate Specification  (3)

Use Scaled coordinates:

Use ImageScaled coordinates:

Use Offset coordinates:

Applications  (7)

Make programmatic annotations to plots:

A simple display of vector fields:

VectorPlot and VectorPlot3D use Arrow:

Use Arrow as an EdgeShapeFunction for GraphPlot:

Define an annotated arrow primitive:

Parallel dimensioning:

Show the direction along curves:

Properties & Relations  (1)

Use Arrowheads to style the axes:

Neat Examples  (4)

A random collection of arrows:

An arrow wheel:

Tangent vectors along an elliptic curve:

A billboard tree using a projected arrowhead:

Introduced in 2007
 (6.0)
 |
Updated in 2008
 (7.0)
2010
 (8.0)