|
SOLUTIONS
|
Mathematica
>
Visualization and Graphics
>
Data Visualization
>
Vector Visualization
>
StreamDensityPlot
BUILT-IN MATHEMATICA SYMBOL
StreamDensityPlot[{{vx, vy}, s}, {x, xmin, xmax}, {y, ymin, ymax}]
generates a stream plot of the vector field
as a function of x and y, superimposed on a background density plot of the scalar field s.
StreamDensityPlot[{vx, vy}, {x, xmin, xmax}, {y, ymin, ymax}]
takes the scalar field to be the norm of the vector field.
StreamDensityPlot[{{vx, vy}, {wx, wy}, ..., s}, {x, xmin, xmax}, {y, ymin, ymax}]
generates plots of several vector fields.
Details and OptionsDetails and Options
- StreamDensityPlot plots streamlines that show the local direction of the vector field at every point.
- StreamDensityPlot by default shows enough streamlines to achieve a roughly uniform density throughout the plot.
- StreamDensityPlot does not show streamlines at any positions for which the
etc. do not evaluate to real numbers. - StreamDensityPlot treats the variables x and y as local, effectively using Block.
- StreamDensityPlot 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. - StreamDensityPlot has the same options as Graphics, with the following additions and changes:
-
AspectRatio 1 ratio of height to width BoundaryStyle None how to draw RegionFunction boundaries BoxRatios Automatic effective 3D box ratios for simulated lighting ColorFunction Automatic how to color background densities ColorFunctionScaling True whether to scale arguments to ColorFunction EvaluationMonitor None expression to evaluate at every function evaluation Frame True whether to draw a frame around the plot FrameTicks Automatic frame tick marks LightingAngle None effective angle for simulated lighting MaxRecursion Automatic the maximum number of recursive subdivisions allowed for the scalar field Mesh None how many mesh lines to draw in the background MeshFunctions {#5&} how to determine the placement of mesh lines MeshShading None how to shade regions between mesh lines MeshStyle Automatic the style of mesh lines Method Automatic methods to use for the plot PerformanceGoal $PerformanceGoal aspects of performance to try to optimize PlotLegends None legends to include PlotRange {Full,Full} range of x, y values to include PlotRangePadding Automatic how much to pad the range of values RegionFunction True& determine what region to include StreamColorFunction None how to color streamlines StreamColorFunctionScaling True whether to scale the argument to StreamColorFunction StreamPoints Automatic determine number, placement and closeness of streamlines StreamScale Automatic determine sizes and segmenting of individual streamlines StreamStyle Automatic how to draw streamlines WorkingPrecision MachinePrecision precision to use in internal computations - The arguments supplied to functions in MeshFunctions, RegionFunction, ColorFunction and StreamColorFunction are x, y,
,
, s. - The default setting MeshFunctions->{#5&} draws mesh lines for the scalar field s.
ExamplesExamplesopen allclose all
Basic Examples (3)Basic Examples (3)
Plot the streamlines for a vector field with background based on field magnitude:
| In[1]:= |
| Out[1]= | ![]() |
Plot the streamlines for a vector field with background based on a logarithm of field magnitude:
| In[1]:= |
| Out[1]= | ![]() |
Plot the streamlines for two fields with a background based on the first field's magnitude:
| In[1]:= |
| Out[1]= | ![]() |
New in 7 | Last modified in 9
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »



