arrow - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


plots

  

arrow

  

plot an arrow or a vector

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

arrow(u, opts)

arrow(u, v, opts)

arrow(U, opts)

Parameters

u, v

-

lists, Vectors, a set (or list) of lists, a set (or list) of Vectors

U

-

set or list containing lists of pairs of Vectors or lists

opts

-

(optional) equation(s) of the form option=value where option is one of shape, length, width, head_width, head_length, plane, border, fringe, difference, or unconstrainedview; specify options for the arrow

Description

• 

The arrow(u) calling sequence plots the arguments in u as arrows with their bases located at the origin.

• 

The arrow(u, v) calling sequence plots at each base point in u arrows in the direction of each point in v.

• 

The arrow(U) calling sequence plots each pair of points as an arrow with its base at the first point in the direction of the second point.

• 

If the arguments have 2 elements, the result is a 2-D plot, whereas if the arguments have 3 elements, the result is a 3-D plot.

• 

The properties of the arrow are described by using optional arguments. The opts argument can contain one or more of the following equations.

  

 

  

shape =harpoon, arrow, double_arrow, or cylindrical_arrow

  

This option specifies the appearance of the arrow.  The value harpoon indicates that the arrow is drawn as a line with a single line indicating the head. The value arrow indicates that the arrow is drawn as a line with two lines indicating the head. The value double_arrow indicates that the arrow is drawn as a rectangle and triangle. The value cylindrical_arrow indicates the arrow is drawn as a cylinder and cone.

  

The default shape for 2- and 3-D arguments is double_arrow and cylindrical_arrow, respectively.

  

Note: The value cylindrical_arrow is not valid if the plot is 2-D.

  

 

  

length =len or [len, lenopts]

  

The argument len is of type algebraic. The optional parameter lenopts is an equation of the form relative=truefalse that specifies whether the length of the arrow len is relative to the distance between the described endpoints, that is, the length of the arrow is the distance between the specified points multiplied by len, or is an absolute length, that is, the length of the arrow is len. The default value is false.

  

If this option is not included, the arrow is plotted between the described endpoints.

  

 

  

width =wid or [wid, widopts]

  

The argument wid is of type algebraic. The optional parameter widopts is an equation of the form relative=truefalse that specifies whether the width wid is relative to the length of the arrow or to an absolute width.

  

If this option is not included, the width is 120 the length of the arrow.

  

 

  

head_width =hwid or [hwid, hwidopts]

  

The argument hwid is of type algebraic. The optional parameter hwidopts is an equation of the form relative=truefalse that specifies whether the width of the head hwid is relative to the width of the arrow or to an absolute width.

  

If this option is not included, the width of the head is twice the width of the arrow.

  

 

  

head_length =hlen or [hlen, hlenopts]

  

The argument hlen is of type algebraic. The optional parameter hlenopts is an equation of the form relative=truefalse that specifies whether the length of the head hlen is relative to the length of the arrow or to an absolute length.

  

If this option is not included, the length of the head is 15 the length of the arrow.

  

 

  

plane =list or Vector

  

If this option is included, the resulting arrow lies in the plane containing the arrow itself and the cross product of the arrow and the plane vector.  If the plane vector and the arrow are collinear, this option is ignored. This option is relevant only for 3-D arrows with shape set to either double_arrow, harpoon, or arrow.

  

 

  

border =truefalse or list

  

This option applies to 2-D arrows having shape double_arrow only. If this option is set to true (the default), then a border is drawn around the arrow. If it is set to false, no border is drawn. If it is a list of plot options, then these options are applied to the border. Only options applicable to curves as described on the plot/option help page are accepted.

  

 

  

difference =truefalse

  

This option, if set to true with both arguments u and v, specifies that the base of the arrow is located at u and the tip of the arrow is located at v.

  

The default value is false, in which case u is the location of the base of the arrow and u + v is the location of the tip of the arrow.

  

 

  

fringe =truefalse, name, or function

  

This option adds a "fringe" around the arrow head. It only works if shape = cylindrical_arrow.

  

The default value is false. If only fringe is chosen, the default color is black. The prespecified colors for the fringes are black, white, red, green, and blue. They must be input in the form fringe = name. For example, fringe = red, produces a red fringe around the arrow head. Other colors can be specified by using the function COLOR(RGB, a, b, c) where a, b, and c are floats between 0.0 and 1.0 .

  

 

  

unconstrainedview=truefalse or list

  

This option applies to 2-D arrows and affects the size and angle of the arrow head.  When unconstrainedview=false, the arrow head is symmetrical with a fringe that is perpendicular to the line of the arrow.  This looks best when the scale of the x and y axes are of equal proportion, or when the plot is using the constrained option.  

  

When unconstrainedview=true, the arrow head is drawn with an angle that matches a possibly stretched view that happens when the x and y axes are not of equal proportion.  

  

When unconstrainedview=[xmin..xmax,ymin..ymax], the arrow head is drawn with an angle that matches the specified overall view.  This is especially useful when drawing many arrows in the same scene.

Examples

withplots:

Plot a sequence of related arrows.

arrowseqsini,cosicos723i,sin723i,i=1..23,axes=frame

Plot three points with various shapes.

a1arrow0,0,1,shape=harpoon:

a2arrow0,1,0,shape=arrow:

a3arrow1,0,0,shape=double_arrow:

a4arrow1,1,1,shape=cylindrical_arrow:

displaya1,a2,a3,a4,scaling=constrained,axes=frame

Plot three points using various options.

b1arrow1,2,3,3,4,5,width=0.2,relative,head_length=0.4,relative,color=red:

b2arrow1,2,3,3,4,5,difference,color=blue:

b3arrow1,2,3,3,4,5,width=0.2,head_length=0.4,color=green:

displayb1,b2,b3,scaling=constrained,axes=frame,lightmodel=light3

c1arrow1,1,1,shape=cylindrical_arrow,fringe:

c2arrow0,0,1,shape=cylindrical_arrow,fringe=red:

c3arrow0,1,0,shape=cylindrical_arrow,fringe=COLORRGB,0.6,0.1,0.7:

displayc1,c2,c3,scaling=constrained,axes=frame

Plot a sequence of arrows of differing sizes.

arrowseqsini,cos0.31i,sin1.033i,i=1..10,scaling=constrained,axes=frame

Display the eigenvectors of a given 3x3 matrix.

A1,3,6|3,5,6|3,2,6:

vals,vectsLinearAlgebraEigenvectorsA:

arrowseqvects1..1,i,i=1..3,scaling=constrained,axes=frame

Produce a directional plot for a given vector-valued function.

arrowseqseqi,j,expisini,expjcosj,i=5..5,j=5..5,length=0.4,scaling=constrained

Display triads at a number of points.

arrow1,2,3,2,3,4,4,0,1,2,3,1,0,0,1,0,1,0,1,0,0

Draw 2-D arrows with and without a border.

displayarrow1,2,color=LightBlue,arrow2,1,color=LightBlue,border=false

Change the properties of a 2-D arrow's border.

arrow1,2,color=LightBlue,border=color=DarkBlue,thickness=3

These next two arrows have the same point, where the magnitude of the x and y coordinates are very different.  Note the use of the scaling=constrained or unconstrainedview=true options.

arrow1,2,scaling=constrained

arrow1,2,unconstrainedview=true

In this plot there are many arrows in the scene.  In order to have them properly drawn together the overall view of the scene is given as a parameter to each individual arrow.

greensColorTools:-AnalogousSpreadGreen,36010+1:

plots:-displayseqplots:-arrow5isiniπ180,icosiπ180,color=greensiquoi,10+1,unconstrainedview=1400..500,200..350,i=1..360,10

Compatibility

• 

The border option was introduced in Maple 2018.

• 

For more information on Maple 2018 changes, see Updates in Maple 2018.

• 

The plots[arrow] command was updated in Maple 2021.

• 

The unconstrainedview option was introduced in Maple 2021.

• 

For more information on Maple 2021 changes, see Updates in Maple 2021.

See Also

list

plot

plot3d

plots

plottools[arrow]

type/truefalse

Vector

VectorCalculus[Vector]