Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Visualization and Graphics > Data Visualization > Vector Visualization >
Mathematica > Visualization and Graphics > Function Visualization > Vector Visualization >

VectorDensityPlot

VectorDensityPlot[{{vx, vy}, s}, {x, xmin, xmax}, {y, ymin, ymax}]
generates a vector plot of the vector field {vx, vy} as a function of x and y, superimposed on a density plot of the scalar field s.
VectorDensityPlot[{vx, vy}, {x, xmin, xmax}, {y, ymin, ymax}]
takes the scalar field to be the norm of the vector field.
VectorDensityPlot[{{vx, vy}, {wx, wy}, ..., s}, {x, xmin, xmax}, {y, ymin, ymax}]
plots several vector fields.
  • VectorDensityPlot by default shows vectors from the vector field at a regular grid of positions.
  • VectorDensityPlot omits any vectors for which the vi etc. do not evaluate to real numbers.
  • VectorDensityPlot has attribute HoldAll, and evaluates the vi, 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 vi, etc. symbolically before specific numerical values are assigned to x and y.
AspectRatio1ratio of height to width
BoundaryStyleNonehow to draw RegionFunction boundaries
BoxRatiosAutomaticeffective 3D box ratios for simulated lighting
ColorFunctionAutomatichow to color background densities
ColorFunctionScalingTruewhether to scale arguments to ColorFunction
EvaluationMonitorNoneexpression to evaluate at every function evaluation
FrameTruewhether to draw a frame around the plot
FrameTicksAutomaticframe tick marks
LightingAngleNoneeffective angle for simulated lighting
MaxRecursionAutomaticthe maximum number of recursive subdivisions allowed for the scalar field
MeshNonehow many mesh lines to draw in the background
MeshFunctions{#5&}how to determine the placement of mesh lines
MeshShadingNonehow to shade regions between mesh lines
MeshStyleAutomaticthe style of mesh lines
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 arguments 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
  • The default setting MeshFunctions->{#5&} draws mesh lines for the scalar field s.
Plot the vector field {y,-x} with background color based on the field magnitude:
Plot two vector fields with background color based on the first field's magnitude:
Plot two vector fields with background color based on the function x+y:
Plot the vector field {y,-x} with background color based on the field magnitude:
In[1]:=
Click for copyable input
Out[1]=
 
Plot two vector fields with background color based on the first field's magnitude:
In[1]:=
Click for copyable input
Out[1]=
 
Plot two vector fields with background color based on the function x+y:
In[1]:=
Click for copyable input
Out[1]=
Plot a vector field with the background and vectors colored according to the field magnitude:
Plot a vector field with arrows of specified size:
Plot a vector field with vectors at random positions:
Plot a vector field showing vectors of constant length at random positions:
By default, the aspect ratio is 1:
Set the aspect ratio:
Use colored backgrounds:
By default, region boundaries have no style:
Apply a variety of styles to region boundaries:
Automatically choose appropriate box ratios:
Make overall shading closely match 3D plots with the box ratios {1,1,.5}:
Increasing the z ratio produces more contrast in shading:
Color the field magnitude using Hue:
Color using Hue based on sin(x y):
Use any named color gradient from ColorData:
Use ColorData for predefined color gradients:
Specify a color function that blends two colors by the x coordinate:
Use ColorFunctionScaling->False to get unscaled values:
By default, scaled values are used:
Use ColorFunctionScaling->False to get unscaled values:
Use unscaled coordinates in the x direction and scaled coordinates in the y directions:
Explicitly specify the scaling for each color function argument:
Show where the vector field function is sampled:
Count the number of times the vector field function is evaluated:
Label the axes:
Vary the lighting angle from 0 (right of the plot) to Pi/2 (top of the plot):
Fix the lighting angle at 0 (right of the plot), and vary the altitude from 0 to Pi/2:
Refine the plot where it changes quickly:
By default, no mesh lines are displayed:
Show the initial and final sampling meshes:
Use a specific number of mesh lines:
Specify specific mesh lines:
Use different styles for different mesh lines:
By default, mesh lines correspond to the magnitude of the field:
Use the x value as the mesh function:
Use mesh lines corresponding to fixed distances from the origin:
Use None to remove regions:
Styles are used cyclically:
Use indexed colors from ColorData cyclically:
Apply a variety of styles to the mesh lines:
Do not use normals in shading:
Randomly vary the effective normals:
Generate a higher-quality plot:
Emphasize performance, possibly at the cost of quality:
The full plot range is used by default:
Specify an explict limit for both x and y ranges:
Specify an explicit range that applies to both x and y ranges:
Specify an explicit x range:
Specify an explicit x minimum range:
Specify an explicit y range:
Specify an explicit y maximum range:
Specify different x and y 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 color gradient from ColorData:
Use ColorData for predefined color gradients:
Specify a color function that blends two colors by the x 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 x direction and scaled coordinates in the y directions:
Explicitly specify the scaling for each color function argument:
Specify a specific 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 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 y coordinate:
Apply a variety of styles to the streamlines:
Specify a custom arrow head:
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 norm:
Use any named color gradient from ColorData:
Color the vectors according to their x value:
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 x direction and scaled coordinates in the y directions:
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 x and y:
Create a regular grid of field vectors with a different number of arrows for x and y:
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 x coordinate:
By default, the vector length is scaled by the norm 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:
New in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team