This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

VectorPlot

VectorPlot
generates a vector plot of the vector field as a function of x and y.
VectorPlot
plots several vector fields.
  • VectorPlot by default shows vectors from the vector field at a regular grid of positions.
  • VectorPlot omits any vectors for which the etc. do not evaluate to real numbers.
  • VectorPlot has attribute HoldAll, and evaluates the , etc. only after assigning specific numerical values to x and y.
  • In some cases it may be more efficient to use Evaluate to evaluate the , etc. symbolically before specific numerical values are assigned to x and y.
AspectRatio1ratio of height to width
EvaluationMonitorNoneexpression to evaluate at every function evaluation
FrameTruewhether to draw a frame around the plot
FrameTicksAutomaticframe tick marks
MethodAutomaticmethods to use for the plot
PerformanceGoal$PerformanceGoalaspects of performance to try to optimize
PlotRange{Full,Full}range of x, y values to include
PlotRangePaddingAutomatichow much to pad the range of values
RegionFunctionTrue&determine what region to include
VectorColorFunctionNonehow to color vectors
VectorColorFunctionScalingTruewhether to scale the argument to VectorColorFunction
VectorPointsAutomaticthe number or placement of vectors to plot
VectorScaleAutomaticthe scale and size of vectors to plot
VectorStyleAutomatichow to draw vectors
WorkingPrecisionMachinePrecisionprecision to use in internal computations
Plot the vector field :
Plot multiple vector fields:
Plot the vector field :
In[1]:=
Click for copyable input
Out[1]=
 
Plot multiple vector fields:
In[1]:=
Click for copyable input
Out[1]=
Plot multiple vector fields:
Use Evaluate to evaluate the vector field symbolically before numeric assignment:
Plot a vector field with vectors placed with specified densities:
Plot the vectors that go through a set of seed points:
Create a regular grid of field vectors with a different number of arrows for and :
Specify a list of points for showing field vectors:
Plot vectors over a specified region:
Plot a vector field with constant size arrows:
Plot a vector field with arrows of specified size:
Vary the arrow length and arrowhead size:
Plot a vector field with arrows colored according to the magnitude of the field:
Set the style for multiple vector fields:
Apply a variety of vector styles:
Plot vectors and streamlines together:
By default, the aspect ratio is 1:
Set the aspect ratio:
Use colored backgrounds:
Show where the vector field function is sampled:
Count the number of times the vector field function is evaluated:
Label the axes:
Generate a higher-quality plot:
Emphasize performance, possibly at the cost of quality:
The full plot range is used by default:
Specify an explicit limit for both and ranges:
Specify an explicit range that applies to both and ranges:
Specify an explicit range:
Specify an explicit minimum range:
Specify an explicit range:
Specify an explicit maximum range:
Specify different and ranges:
Plot vectors only over certain quadrants:
Plot vectors only over regions where the field magnitude is above a given threshold:
Use any logical combination of conditions:
Color streamlines according to the norm of the vector field:
Use any named color gradient from ColorData:
Use ColorData for predefined color gradients:
Specify a color function that blends two colors by the coordinate:
Use StreamColorFunctionScaling->False to get unscaled values:
By default, scaled values are used:
Use StreamColorFunctionScaling->False to get unscaled values:
Use unscaled coordinates in the direction and scaled coordinates in the direction:
Explicitly specify the scaling for each color function argument:
Specify a maximum number of streamlines:
Use symbolic names to specify the number of streamlines:
Use both automatic and explicit seeding with styles for explicitly seeded streamlines:
Specify the minimum distance between streamlines:
Specify the minimum distance between streamlines at the start and end of a streamline:
Control the maximum length that each streamline can have:
Create full streamlines without segmentation:
Use curves for streamlines:
Use symbolic names to control the lengths of streamlines:
Specify segment lengths:
Specify an explicit dashing pattern for streamlines:
Specify the number of points rendered on each streamline segment:
Specify absolute aspect ratios relative to the longest line segment:
Specify relative aspect ratios relative to each line segment:
Scale the length of the arrows by the coordinate:
Apply a variety of styles to the streamlines:
Specify a custom arrowhead:
Set the style for multiple vector fields:
Use named styles:
Named arrow styles:
Named dot styles:
Named pointer styles:
Named dart styles:
Color the vectors according to their norms:
Use any named color gradient from ColorData:
Color the vectors according to their values:
Use VectorColorFunctionScaling->False to get unscaled values:
By default, scaled values are used:
Use VectorColorFunctionScaling->False to get unscaled values:
Use unscaled coordinates in the direction and scaled coordinates in the direction:
Explicitly specify the scaling for each color function argument:
Use automatically determined vector points:
Use symbolic names to specify the set of field vectors:
Create a regular grid of field vectors with the same number of arrows for and :
Create a regular grid of field vectors with a different number of arrows for and :
Specify a list of points for showing field vectors:
Use a different number of field vectors on a regular grid:
The location for vectors is given in the middle of the drawn vector:
Use automatically determined vector scale:
Specify the relative size of vectors as a fraction of the diagonal of the plot range:
Use symbolic names to control the size of vectors:
With the vector scaling function set to None, then all vectors have the same size:
Specify an absolute size for the arrowheads:
Specify arrowhead size relative to the length of the arrow:
Scale the vector length by the absolute value of the coordinate:
By default, the vector length is scaled by the norm of the vector field:
Scale the vector length by the component of the vector field:
Set the style for the displayed vectors:
Set the style for multiple vector fields:
Plot the vector fields without arrowheads:
Plot the vector field with a named vector style:
Arrow vector styles:
Circular vector styles:
Dart vector styles:
Vector styles with dots:
Pointer vector styles:
Use Arrowheads to specify an explicit style of the arrowheads:
Specify both arrow tail and head:
Graphics primitives without Arrowheads are scaled based on the vector scale:
Change the scaling using the VectorScale option:
Gradient field of over the unit square:
Hamiltonian vector field of :
Polya field plot of []:
Polya field plot of :
Characterize linear planar systems interactively:
Use vectors to indicate the stability of a limit cycle:
Use ListVectorPlot for plotting data:
Use VectorDensityPlot to add a density plot of the scalar field:
Use ListVectorDensityPlot for plotting data with a density plot of the scalar field:
Use StreamPlot to plot with streamlines instead of vectors:
Use LineIntegralConvolutionPlot to plot the line integral convolution of a vector field:
Use VectorPlot3D to visualize 3D vector fields:
New in 7