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

Examples

open allclose all

Basic Examples  (4)

Plot the streamlines with arrows for the field :

Include a legend for the field magnitude:

Visualize streamlines as unbroken lines:

Use a multi-panel layout to show multiple vector fields at the same time:

Scope  (22)

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:

Plot multiple vector fields:

Use a specific number of mesh lines:

Specify specific 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  (12)

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:

Use a theme with axes:

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:

Show multiple functions as densities in separate panels:

Use a column instead of a row:

Add a legend with placeholder text:

Use the vector fields as legend labels:

Use explicit labels for each vector field:

Use a log scale for the x axis:

Reverse the y scale so it increases toward the bottom:

Options  (97)

AspectRatio  (3)

By default, StreamPlot uses the same width and height:

Use numerical value to specify the height to width ratio:

AspectRatioAutomatic determines the ratio from the plot ranges:

Axes  (4)

By default, StreamPlot uses a frame instead of axes:

Use axes instead of a frame:

Use AxesOrigin to specify where the axes intersect:

Turn each axis on individually:

AxesLabel  (3)

No axes labels are drawn by default:

Place a label on the axis:

Specify axes labels:

AxesOrigin  (2)

The position of the axes is determined automatically:

Specify an explicit origin for the axes:

AxesStyle  (4)

Change the style for the axes:

Specify the style of each axis:

Use different styles for the ticks and the axes:

Use different styles for the labels and the axes:

Background  (1)

Use colored backgrounds:

EvaluationMonitor  (2)

Show where the vector field function is sampled:

Count the number of times the vector field function is evaluated:

ImageSize  (5)

Use named sizes such as Tiny, Small, Medium and Large:

Specify the width of the plot:

Specify the height of the plot:

Allow the width and height to be up to a certain size:

Specify the width and height for a graphic, padding with space if necessary:

Use maximum sizes for the width and height:

Mesh  (5)

By default, no mesh lines are displayed:

Show the final sampling mesh:

Use a specific number of mesh lines:

Specify mesh lines:

Use different styles for different mesh lines:

MeshFunctions  (3)

By default, mesh lines correspond to the magnitude of the field:

Use the value as the mesh function:

Use mesh lines corresponding to fixed distances from the origin:

MeshShading  (3)

Use None to remove regions:

Styles are used cyclically:

Use indexed colors from ColorData cyclically:

MeshStyle  (1)

Apply a variety of styles to the mesh lines:

PerformanceGoal  (2)

Generate a higher-quality plot:

Emphasize performance, possibly at the cost of quality:

PlotLayout  (2)

Place each group of vectors in a separate panel using shared axes:

Use a row instead of a column:

Use multiple columns or rows:

Prefer full columns or rows:

PlotLegends  (6)

No legends are included by default:

Include a legend to show the color range of field norms:

Control the placement of the legend:

Include a legend for multiple fields:

Use the vector fields as the legend text:

Use placeholder text:

Change the appearance of the legend:

PlotRange  (5)

The full plot range is used by default:

Specify an explicit limit for both and ranges:

Specify an explicit range:

Specify an explicit range:

Specify different and ranges:

PlotTheme  (2)

Use a theme with simpler ticks and brighter colors:

Use a theme with dense streamlines:

Change the stream styles:

RegionBoundaryStyle  (2)

By default, region boundaries are styled:

Show no boundaries and filling:

Apply a variety of styles to region boundaries:

RegionFillingStyle  (1)

By default, region filling is styled:

Show no filling:

RegionFunction  (3)

Plot streamlines only over certain quadrants:

Plot streamlines only over regions where the field magnitude is above a given threshold:

Use any logical combination of conditions:

ScalingFunctions  (2)

Use a log scale for the x axis:

Reverse the y scale so it increases toward the bottom:

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 direction:

Explicitly specify the scaling for each color function argument:

StreamMarkers  (7)

Streamlines are drawn as arrows by default:

Use a named appearance to draw the streamlines:

Use different markers for different vector fields:

Named arrow styles:

Named dot styles:

Named pointer styles:

Named dart styles:

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:

Control the maximum length that each streamline can have:

StreamScale  (9)

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:

StreamStyle  (5)

StreamColorFunction has precedence over colors specified in StreamStyle:

Set StreamColorFunctionNone to specify colors with StreamStyle:

Apply a variety of styles to the streamlines:

Specify a custom arrowhead:

Set the style for multiple vector fields:

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:

Van der Pol oscillator:

Characterize linear planar systems interactively:

Use a stream plot as a background for an interactive differential equation solution plotter:

Unfolding a double zero eigenvalue:

Rotating pendulum:

A two-parameter potential:

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:

Generate a list of stream plots of varying :

Stack 2D stream plots in 3D:

Specify the geometry for a fluid flow:

Specify the boundary conditions for a flow that enters at the left-hand channel and exits through the two right-hand channels:

Define the NavierStokes equations:

Use the finite element method to solve for the steady flow velocities and pressure:

Use DensityPlot to plot the pressure and StreamPlot to plot the flow:

Properties & Relations  (11)

Use ListStreamPlot for plotting data:

Use VectorPlot to plot with vectors instead of streamlines:

Use ListVectorPlot to generate a plot based on data:

Use StreamPlot3D to plot streamlines of 3D vector fields:

Use ListStreamPlot3D to plot streamlines based on data:

Use StreamDensityPlot to add a density plot of the scalar field:

Use VectorDensityPlot to plot vectors instead of streamlines:

Use ListStreamDensityPlot to generate a plot based on data:

Use ListVectorDensityPlot to plot arrows instead of streamlines:

Use LineIntegralConvolutionPlot to plot the line integral convolution of a vector field:

Use VectorDisplacementPlot to visualize the deformation of a region associated with a displacement vector field:

Use ListVectorDisplacementPlot to visualize the same deformation based on data:

Use VectorPlot3D to visualize 3D vector fields:

Use ListVectorPlot3D to generate a plot based on data:

Plot vectors on surfaces with SliceVectorPlot3D:

Plot vectors based on data:

Use VectorDisplacementPlot3D to visualize the deformation of a 3D region associated with a displacement vector field:

Use ListVectorDisplacementPlot3D to visualize the same deformation based on data:

Plot a complex function as a vector field using streamlines:

Use vectors instead of streamlines:

Use GeoVectorPlot to plot vectors on a map:

Use GeoStreamPlot to plot streamlines instead of vectors:

Wolfram Research (2008), StreamPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/StreamPlot.html (updated 2022).

Text

Wolfram Research (2008), StreamPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/StreamPlot.html (updated 2022).

CMS

Wolfram Language. 2008. "StreamPlot." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. 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

BibTeX

@misc{reference.wolfram_2024_streamplot, author="Wolfram Research", title="{StreamPlot}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/StreamPlot.html}", note=[Accessed: 26-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_streamplot, organization={Wolfram Research}, title={StreamPlot}, year={2022}, url={https://reference.wolfram.com/language/ref/StreamPlot.html}, note=[Accessed: 26-December-2024 ]}