Mathematica > Visualization and Graphics > Data Visualization > Vector Visualization >
Mathematica > Visualization and Graphics > Function Visualization > Vector Visualization >

StreamPlot

StreamPlot[{vx, vy}, {x, xmin, xmax}, {y, ymin, ymax}]
generates a stream plot of the vector field {vx, vy} as a function of x and y.
StreamPlot[{{vx, vy}, {wx, wy}, ...}, {x, xmin, xmax}, {y, ymin, ymax}]
generates plots of several vector fields.
  • StreamPlot plots streamlines that show the local direction of the vector field at each point.
  • StreamPlot by default shows enough streamlines to achieve a roughly uniform density throughout the plot, and shows no background scalar field.
  • StreamPlot does not show streamlines at any positions for which the vi etc. do not evaluate to real numbers.
  • StreamPlot 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
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
StreamColorFunctionNonehow to color streamlines
StreamColorFunctionScalingTruewhether to scale the argument to StreamColorFunction
StreamPointsAutomaticdetermine number, placement and closeness of streamlines
StreamScaleAutomaticdetermine sizes and segmenting of individual streamlines
StreamStyleAutomatichow to draw streamlines
WorkingPrecisionMachinePrecisionprecision to use in internal computations
Plot the streamlines with arrows for the field {-x^2+y-1,x-y^2+1}:
In[1]:=
Click for copyable input
Out[1]=
 
Plot the streamlines with arrows for two fields:
In[1]:=
Click for copyable input
Out[1]=
New in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team