Contents - Index


$VectorPlot and $VectorPlot2D

 

This directive can be used to create 2D or 3D vector plots.  The format is 

 

$VectorPlot2D  Name='My2D Plot'  A:0/black  B:!/red  {for a 2D plot}

 

$VectorPlot  Name='My3D Plot'  A:0/black  B:!/red  {for a 3D plot}

 

Note that $VectorPlot3D is the same as $VectorPlot

 

Name=

Sets the name of the tab for this plot window to the string constant or variable following the = sign.  The string constant must be surrounded with single quotes.  This keyword is required.  If a plot having the same name as that provided after the = sign exists, the plot will be deleted and replaced with the plot generated by this macro command.

 

Vector Name:Origin pairs

The vectors that are to be plotted are provided after the plot name.  Note that each vector must previously  appear in a $Vector or $Vector2D directive and the vector must be determined.  The origin of each vector is provided by separating the vector name and origin with a colon (no spaces).  The origin can be designated as:

 

{indicates that the origin is the zeros vector}

{indicates that the origin is the head of the last vector that was plotted}

Vector name {indicates that the origin is the value of this vector}

 

The vector name:origin pair may be optionally followed by the / character and a color name. The vector will be shown in the specified color if it is provided; otherwise it will be shown in black.  The available colors are

 

Black

Blue

Red

Green

Purple

Maroon

Yellow

Lime

Olive

Aqua

Gray

Fuchsia

Navy

Teal

Silver

Orange

 

Example:

$Vector A, B, C

A=VectorAssign(0.4, 0.2, 0.1) [m]

B=VectorAssign(0.2,0.4,0) [m]

C=VectorAssign(-0.4,-0.3,0) [m]

 

$VectorPlot Name='my3DPlot'  A:0  B:A/red  C:!/blue

$VectorPlot2D Name='my2DPlot'  A:0  B:A/red  C:!/blue

 

 

 

 

See also:  Vectors

                Vector Plot