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[…,{x,y}∈reg]
takes the variables {x,y} to be in the geometric region reg.
Details and Options



- StreamPlot plots streamlines that show the local direction of the vector field at each point, effectively solving the system of differential equations
and then plotting
.
- 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 treats the variables x and y as local, effectively using Block.
- 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.
- StreamPlot has the same options as Graphics, with the following additions and changes:
-
AspectRatio 1 ratio of height to width EvaluationMonitor None expression to evaluate at every function evaluation Frame True whether to draw a frame around the plot FrameTicks Automatic frame tick marks 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 PlotTheme $PlotTheme overall theme for the plot RegionBoundaryStyle Automatic how to style plot region boundaries RegionFillingStyle Automatic how to style plot region interiors RegionFunction True& determine what region to include StreamColorFunction Automatic how to color streamlines StreamColorFunctionScaling True whether to scale the argument to StreamColorFunction StreamMarkers Automatic shape to use for streams 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 RegionFunction and StreamColorFunction are x, y, vx, vy, Norm[{vx,vy}].

Examples
open allclose allBasic Examples (3)
Scope (20)
Sampling (10)
Plot a vector field with streamlines placed with specified densities:
Plot the streamlines that go through a set of seed points:
Use both automatic and explicit seeding with styles for explicitly seeded streamlines:
Plot streamlines over a specified region:
Use a specific number of mesh lines:
Use Evaluate to evaluate the vector field symbolically before numeric assignment:
The domain may be specified by a region:
The domain may be specified by a MeshRegion:
Presentation (10)
Specify different dashings and arrowheads by setting to StreamScale:
Plot the streamlines with arrows colored according to the magnitude of the field:
Apply a variety of streamline styles:
Override the style from the theme:
Use a named appearance to draw the streamlines:
Style the streamlines as well:
Specify mesh lines with different styles:
Specify global mesh line styles:
Shade mesh regions cyclically:
Apply a variety of styles to region boundaries:
Add a legend with placeholder text:
Options (74)
EvaluationMonitor (2)
Mesh (5)
MeshFunctions (3)
MeshShading (3)
PerformanceGoal (2)
PlotLegends (5)
PlotRange (5)
PlotTheme (2)
RegionFunction (3)
RegionBoundaryStyle (2)
StreamColorFunction (5)
By default, 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:
StreamColorFunctionScaling (4)
By default, scaled values are used:
Use StreamColorFunctionScaling->False to get unscaled values:
Use unscaled coordinates in the direction and scaled coordinates in the
directions:
Explicitly specify the scaling for each color function argument:
StreamMarkers (7)
StreamPoints (6)
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:
StreamScale (9)
Create full streamlines without segmentation:
Use symbolic names to control the lengths of streamlines:
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:
StreamStyle (5)
StreamColorFunction has precedence over colors specified in StreamStyle:
Set StreamColorFunctionNone to specify colors with StreamStyle:
Applications (16)
Streamlines for the gradient field of over the unit square:
Streamlines for the Hamiltonian vector field of :
Global attractor of damped conservative system:
Combine several examples into a tabbed view:
Mouse over the tabs to get a description of the vector field:
Quadratic system with two limit cycles:
Characterize linear planar systems interactively:
Use a stream plot as a background for an interactive differential equation solution plotter:
Unfolding a double zero eigenvalue:
Unfolding the elliptic umbilic:
Generate a list of rasterized stream plots for animation:
Animating a list of rasters instead of the original vector graphics may reduce memory usage:
Create an animation that shifts the streamline colors in the direction of the vector norms:
Explore various streamline styles and scales with several examples:
Generate icons to graphically represent field choices:
Click on the field icons to switch field plots:
Properties & Relations (8)
Use ListStreamPlot for plotting data:
Use StreamDensityPlot to add a density plot of the scalar field:
Use ListStreamDensityPlot for plotting data with a density plot of the scalar field:
Use VectorPlot to plot with vectors instead of streamlines:
Use LineIntegralConvolutionPlot to plot the line integral convolution of a vector field:
Use VectorPlot3D to visualize 3D vector fields:
Plot vectors on surfaces with SliceVectorPlot3D:
Plot a complex function as a vector field using streamlines:
Text
Wolfram Research (2008), StreamPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/StreamPlot.html (updated 2020).
BibTeX
BibLaTeX
CMS
Wolfram Language. 2008. "StreamPlot." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/StreamPlot.html.
APA
Wolfram Language. (2008). StreamPlot. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StreamPlot.html