StreamPlot3D
✖
StreamPlot3D
plots streamlines for the vector field {vx,vy,vz} as functions of x, y and z.
takes the variables {x,y,z} to be in the geometric region reg.
Details and Options




- StreamPlot3D is known as a 3D stream plot or streamline plot. Besides lines, streamlines can also be displayed as tubes (stream tubes) and ribbons (stream ribbons).
- StreamPlot3D plots streamlines
defined by
and
, where
and
is an initial stream point. The streamline
is the curve passing through point
, and whose tangents correspond to the vector field
at each point.
- The streamlines are colored by default according to the magnitude
of the vector field
.
- StreamPlot3D by default shows enough streamlines to achieve a roughly uniform density throughout the plot and shows no background scalar field.
- StreamPlot3D treats the variables x, y and z as local, effectively using Block.
- StreamPlot3D has attribute HoldAll and evaluates the vi etc. only after assigning specific numerical values to x, y and z. In some cases, it may be more efficient to use Evaluate to evaluate the vi etc. symbolically first.
- StreamPlot3D has the same options as Graphics3D, with the following additions and changes: [List of all options]
-
BoxRatios {1,1,1} ratio of height to width EvaluationMonitor None expression to evaluate at every function evaluation 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,Full} range of x, y, z 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 RegionFunction True& determine what region to include ScalingFunctions None how to scale individual coordinates StreamColorFunction Automatic how to color streamlines StreamColorFunctionScaling True whether to scale the argument to StreamColorFunction StreamMarkers Automatic shape to use for streams StreamPoints Automatic the number or placement of streamlines StreamScale None how to scale the sizes of streamlines StreamStyle Automatic how to draw streamlines WorkingPrecision MachinePrecision precision to use in internal computations - The arguments supplied to functions in RegionFunction and ColorFunction are x,y,z,vx,vy,vz,Norm[{vx,vy,vz}].
- Possible settings for StreamMarkers include:
-
"Arrow" lines with 2D arrowheads "Arrow3D" tubes with 3D arrowheads "Line" lines "Tube" tubes "Ribbon" flat ribbons "ArrowRibbon" ribbons with built-in arrowheads - With StreamScaleAutomatic and "arrow" stream markers, the streamlines are split into segments to make it easier to see the direction of the streamlines.
- Possible settings for StreamScale are:
-
Automatic automatically determine the streamline segments Full show the streamline as one piece Tiny,Small,Medium,Large named settings for how long the segments should be {len,npts,ratio} use explicit specification of streamline segmentation - The length len of streamline segments can be one of the following forms:
-
Automatic automatically determine the length None show the streamline as one piece Tiny,Small,Medium,Large use named segment lengths s use a length s that is a fraction of the graphic size - The number of points npts used to draw each segment can be Automatic or a specific number of points.
- The aspect ratio ratio specifies how wide the cross section of a streamline is relative to the streamline segment.
- Possible settings for ScalingFunctions include:
-
{sx,sy,sz} scale x, y and z axes - Common built-in scaling functions s include:
-
"Log" log scale with automatic tick labeling "Log10" base-10 log scale with powers of 10 for ticks "SignedLog" log-like scale that includes 0 and negative numbers "Reverse" reverse the coordinate direction "Infinite" infinite scale -
AlignmentPoint Center the default point in the graphic to align with AspectRatio Automatic ratio of height to width Axes False whether to draw axes AxesEdge Automatic on which edges to put axes AxesLabel None axes labels AxesOrigin Automatic where axes should cross AxesStyle {} graphics directives to specify the style for axes Background None background color for the plot BaselinePosition Automatic how to align with a surrounding text baseline BaseStyle {} base style specifications for the graphic Boxed True whether to draw the bounding box BoxRatios {1,1,1} ratio of height to width BoxStyle {} style specifications for the box ClipPlanes None clipping planes ClipPlanesStyle Automatic style specifications for clipping planes ContentSelectable Automatic whether to allow contents to be selected ControllerLinking False when to link to external rotation controllers ControllerPath Automatic what external controllers to try to use Epilog {} 2D graphics primitives to be rendered after the main plot EvaluationMonitor None expression to evaluate at every function evaluation FaceGrids None grid lines to draw on the bounding box FaceGridsStyle {} style specifications for face grids FormatType TraditionalForm default format type for text ImageMargins 0. the margins to leave around the graphic ImagePadding All what extra padding to allow for labels, etc. ImageSize Automatic absolute size at which to render the graphic LabelStyle {} style specifications for labels Lighting Automatic simulated light sources to use Method Automatic methods to use for the plot PerformanceGoal $PerformanceGoal aspects of performance to try to optimize PlotLabel None a label for the plot PlotLegends None legends to include PlotRange {Full,Full,Full} range of x, y, z values to include PlotRangePadding Automatic how much to pad the range of values PlotRegion Automatic final display region to be filled PlotTheme $PlotTheme overall theme for the plot PreserveImageOptions Automatic whether to preserve image options when displaying new versions of the same graphic Prolog {} 2D graphics primitives to be rendered before the main plot RegionBoundaryStyle Automatic how to style plot region boundaries RegionFunction True& determine what region to include RotationAction "Fit" how to render after interactive rotation ScalingFunctions None how to scale individual coordinates SphericalRegion Automatic whether to make the circumscribing sphere fit in the final display area StreamColorFunction Automatic how to color streamlines StreamColorFunctionScaling True whether to scale the argument to StreamColorFunction StreamMarkers Automatic shape to use for streams StreamPoints Automatic the number or placement of streamlines StreamScale None how to scale the sizes of streamlines StreamStyle Automatic how to draw streamlines Ticks Automatic specification for ticks TicksStyle {} style specification for ticks TouchscreenAutoZoom False whether to zoom to fullscreen when activated on a touchscreen ViewAngle Automatic angle of the field of view ViewCenter Automatic point to display at the center ViewMatrix Automatic explicit transformation matrix ViewPoint {1.3,-2.4,2.} viewing position ViewProjection Automatic projection method for rendering objects distant from the viewer ViewRange All range of viewing distances to include ViewVector Automatic position and direction of a simulated camera ViewVertical {0,0,1} direction to make vertical WorkingPrecision MachinePrecision precision to use in internal computations

List of all options




Examples
open allclose allBasic Examples (4)Summary of the most common use cases
Plot streamlines through a vector field in 3D:

https://wolfram.com/xid/0h2hohphbs-7l2xy6

Use tubes to show the streamlines:

https://wolfram.com/xid/0h2hohphbs-eer690

Include a legend for the vector field magnitudes:

https://wolfram.com/xid/0h2hohphbs-c1etvs

Plot streamlines over an arbitrary region:

https://wolfram.com/xid/0h2hohphbs-e77zl0

Scope (12)Survey of the scope of standard use cases
Sampling (3)
Specify the density of seed points for the streamlines:

https://wolfram.com/xid/0h2hohphbs-e7oat6

Specify specific seed points for the streamlines:

https://wolfram.com/xid/0h2hohphbs-fxnrov

Plot streamlines over a specified region:

https://wolfram.com/xid/0h2hohphbs-bn2hn9

Presentation (9)
Streamlines are drawn as lines by default:

https://wolfram.com/xid/0h2hohphbs-d0kagv

Use 3D tubes for the streamlines:

https://wolfram.com/xid/0h2hohphbs-7yhk9d


https://wolfram.com/xid/0h2hohphbs-7valar

Use "arrow" versions of the stream markers to indicate the direction of flow along the streamlines:

https://wolfram.com/xid/0h2hohphbs-yodur5


https://wolfram.com/xid/0h2hohphbs-b50806

Ribbons are turned into arrows by tapering the heads and notching the tails of the streamlines:

https://wolfram.com/xid/0h2hohphbs-r6336g

Use a single color for the streamlines:

https://wolfram.com/xid/0h2hohphbs-jm5w18

Use a named color gradient for the streamlines:

https://wolfram.com/xid/0h2hohphbs-ivhrn8

Include a legend for the field magnitude:

https://wolfram.com/xid/0h2hohphbs-gjvu3j

Use StreamScale to split streamlines into multiple shorter line segments:

https://wolfram.com/xid/0h2hohphbs-htz8xw


https://wolfram.com/xid/0h2hohphbs-zkxmpy

Increase the number of points in each segment and increase the marker aspect ratio:

https://wolfram.com/xid/0h2hohphbs-xz6hw


https://wolfram.com/xid/0h2hohphbs-5pfm

Use a log scale for the x axis:

https://wolfram.com/xid/0h2hohphbs-nvp776

Reverse the y scale so it increases toward the bottom:

https://wolfram.com/xid/0h2hohphbs-nq43yb

Options (42)Common values & functionality for each option
BoxRatios (2)
PlotLegends (3)
No legends are included by default:

https://wolfram.com/xid/0h2hohphbs-75qde

Include a legend that indicates the vector field norm:

https://wolfram.com/xid/0h2hohphbs-h2takf

Specify the location of the legend:

https://wolfram.com/xid/0h2hohphbs-ilg48y

RegionBoundaryStyle (4)
Show the region defined by a RegionFunction:

https://wolfram.com/xid/0h2hohphbs-c4b1vn

Use None to avoid showing the boundary:

https://wolfram.com/xid/0h2hohphbs-ybl6d

Specify the color of the region boundary:

https://wolfram.com/xid/0h2hohphbs-jwww4

The boundaries of full rectangular regions are not shown:

https://wolfram.com/xid/0h2hohphbs-k2tk4k

RegionFunction (4)

https://wolfram.com/xid/0h2hohphbs-gezqs8

Plot streams only where the field magnitude exceeds a given threshold:

https://wolfram.com/xid/0h2hohphbs-gkm8g

Region functions depend, in general, on seven arguments:

https://wolfram.com/xid/0h2hohphbs-cro439

Use RegionBoundaryStyleNone to avoid showing the boundary:

https://wolfram.com/xid/0h2hohphbs-shcec

ScalingFunctions (1)
StreamColorFunction (4)
Color the streams by their norm:

https://wolfram.com/xid/0h2hohphbs-c9ywkr

Use any named color gradient from ColorData:

https://wolfram.com/xid/0h2hohphbs-env6ib

Color the streamlines according to their x value:

https://wolfram.com/xid/0h2hohphbs-ght88z

Use StreamColorFunctionScalingFalse to get unscaled values:

https://wolfram.com/xid/0h2hohphbs-d6q4qo

StreamColorFunctionScaling (2)
By default, scaled values are used:

https://wolfram.com/xid/0h2hohphbs-2xeho

Use StreamColorFunctionScalingFalse to get unscaled values:

https://wolfram.com/xid/0h2hohphbs-igtjhs

StreamMarkers (5)

https://wolfram.com/xid/0h2hohphbs-dluaug

Draw the streamlines as tubes:

https://wolfram.com/xid/0h2hohphbs-q5sh0o


https://wolfram.com/xid/0h2hohphbs-p60m4u

"Arrow" stream markers automatically break the streamlines into shorter segments:

https://wolfram.com/xid/0h2hohphbs-wtjp5k


https://wolfram.com/xid/0h2hohphbs-zfhge4


https://wolfram.com/xid/0h2hohphbs-hw6bje

Make segmented markers continuous:

https://wolfram.com/xid/0h2hohphbs-fo0md2

Break continuous markers into segments:

https://wolfram.com/xid/0h2hohphbs-hhoa6r

StreamPoints (4)
Use automatically determined stream points to seed the curves:

https://wolfram.com/xid/0h2hohphbs-thyfy

Specify a maximum number of streamlines:

https://wolfram.com/xid/0h2hohphbs-cdqcw7

Give specific seed points for the streams:

https://wolfram.com/xid/0h2hohphbs-cvbmir

Use coarsely spaced streamlines:

https://wolfram.com/xid/0h2hohphbs-intmtl

Use more finely spaced streamlines:

https://wolfram.com/xid/0h2hohphbs-xgxkhy

StreamScale (9)
Segmented markers have default lengths, numbers of points and aspect ratios:

https://wolfram.com/xid/0h2hohphbs-fa398u

Modify the lengths of the segments:

https://wolfram.com/xid/0h2hohphbs-h67af4

Specify the number of sample points in each segment:

https://wolfram.com/xid/0h2hohphbs-o3yh2i

Modify the aspect ratios for the stream markers:

https://wolfram.com/xid/0h2hohphbs-b63ith

Make segmented markers continuous:

https://wolfram.com/xid/0h2hohphbs-bgsul9

Break continuous markers into segments:

https://wolfram.com/xid/0h2hohphbs-fpqk6n

The aspect ratio controls the thickness of ribbons and tubes:

https://wolfram.com/xid/0h2hohphbs-ccasj0

Increase the width of the ribbons and tubes:

https://wolfram.com/xid/0h2hohphbs-uduk93

The aspect ratio controls the sizes of arrowheads:

https://wolfram.com/xid/0h2hohphbs-do3ic

Control the number of points in each segment:

https://wolfram.com/xid/0h2hohphbs-bzpnib

StreamStyle (3)
Change the appearance of the streamlines:

https://wolfram.com/xid/0h2hohphbs-mcvu92

StreamColorFunction takes precedence over StreamStyle:

https://wolfram.com/xid/0h2hohphbs-f1mlhd

Use StreamColorFunctionNone to specify a streamline color with StreamStyle:

https://wolfram.com/xid/0h2hohphbs-bej8i5

Applications (10)Sample problems that can be solved with this function
Basic Applications (1)
Fluid Flow (3)
Consider Stokes flow for a point force of the form , where
is a constant vector and
is a Dirac delta function. For example, a force pointing down:

https://wolfram.com/xid/0h2hohphbs-l1ehv
Define the fluid velocity vector , the pressure
and the viscosity
:

https://wolfram.com/xid/0h2hohphbs-gbqhfo
Confirm that the equations for Stokes flow are satisfied so that and
:

https://wolfram.com/xid/0h2hohphbs-kg4kxv

Plot streamlines for the flow:

https://wolfram.com/xid/0h2hohphbs-dt39c0

Visualize Stokes flow around a unit sphere. Define the fluid velocity vector , the pressure
, the viscosity
and the far-field fluid speed
:

https://wolfram.com/xid/0h2hohphbs-jmre3
Confirm that the equations for Stokes flow are satisfied so that and
:

https://wolfram.com/xid/0h2hohphbs-0uc9j

Plot streamlines for the flow:

https://wolfram.com/xid/0h2hohphbs-bgfk0v

Plot the pressure for the flow:

https://wolfram.com/xid/0h2hohphbs-g4m3qc

Specify the Navier–Stokes equations for a fluid through a pipe with a bulge:

https://wolfram.com/xid/0h2hohphbs-4623s
Specify the geometry for the flow:

https://wolfram.com/xid/0h2hohphbs-cgz23p

Specify the boundary conditions for flow from left to right:

https://wolfram.com/xid/0h2hohphbs-fv3vm1
Solve for the flow velocities and pressure:

https://wolfram.com/xid/0h2hohphbs-vubsv
Specify seed points for the streamlines:

https://wolfram.com/xid/0h2hohphbs-eu7gxo
Plot the streamlines for the flow:

https://wolfram.com/xid/0h2hohphbs-6cz8h

Electrical Systems (1)
Visualize electric field lines for a dipole:

https://wolfram.com/xid/0h2hohphbs-esxrsk

The streamlines appear to have uniform color because of the extremely rapid change in the vector field norm near the point charges at . Bounding the magnitude of the vector field norm with a region function makes the colors visible:

https://wolfram.com/xid/0h2hohphbs-gcwtq

Add spheres to indicate the positive (red) and negative (black) point charges:

https://wolfram.com/xid/0h2hohphbs-juszal

Arrows can be used to provide more information, but the colors change because arrow markers are colored by the field magnitude at the tip of the arrow:

https://wolfram.com/xid/0h2hohphbs-s2ry8

Use a custom StreamColorFunction to exert more control over the colors:

https://wolfram.com/xid/0h2hohphbs-b6caq

Miscellaneous (5)

https://wolfram.com/xid/0h2hohphbs-jt6jw3

Use ribbons or arrow ribbons to visualize the torsion of a twisted cubic:

https://wolfram.com/xid/0h2hohphbs-dkk18w

Visualize solutions of differential equations on manifolds:

https://wolfram.com/xid/0h2hohphbs-lh4ri5

Visualize streamlines for Poiseuille flow. The fluid speed is fastest along the central axis:

https://wolfram.com/xid/0h2hohphbs-dflwji

Visualize solutions of Euler's equations for a rotating rigid body:

https://wolfram.com/xid/0h2hohphbs-c6ugrw

Properties & Relations (9)Properties of the function, and connections to other functions
Use VectorPlot3D to visualize a field with discrete arrows:

https://wolfram.com/xid/0h2hohphbs-tfckgh

Use ListStreamPlot3D or ListVectorPlot3D to generate plots based on data:

https://wolfram.com/xid/0h2hohphbs-e1zsgm

https://wolfram.com/xid/0h2hohphbs-fhu0cr

Use StreamPlot to plot streamlines of 2D vector fields:

https://wolfram.com/xid/0h2hohphbs-ey0nl

Use VectorPlot to plot with vectors instead of streamlines:

https://wolfram.com/xid/0h2hohphbs-fqjjue


https://wolfram.com/xid/0h2hohphbs-g4tvke

https://wolfram.com/xid/0h2hohphbs-bx0fdl

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

https://wolfram.com/xid/0h2hohphbs-gljrl7

Use VectorDensityPlot to plot with arrows instead of streamlines:

https://wolfram.com/xid/0h2hohphbs-bqtw4r


https://wolfram.com/xid/0h2hohphbs-dw8y5x

https://wolfram.com/xid/0h2hohphbs-bx885a

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

https://wolfram.com/xid/0h2hohphbs-biddpp

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

https://wolfram.com/xid/0h2hohphbs-bmfpco

Use ListVectorDisplacementPlot to visualize the same deformation based on data:

https://wolfram.com/xid/0h2hohphbs-hv6sr

https://wolfram.com/xid/0h2hohphbs-gx4rw8

Plot vectors along surfaces with SliceVectorPlot3D:

https://wolfram.com/xid/0h2hohphbs-ckcmzh


https://wolfram.com/xid/0h2hohphbs-bhaag3

https://wolfram.com/xid/0h2hohphbs-m3th23

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

https://wolfram.com/xid/0h2hohphbs-001n1

Use ListVectorDisplacementPlot3D to visualize the same deformation based on data:

https://wolfram.com/xid/0h2hohphbs-bb0b1i

https://wolfram.com/xid/0h2hohphbs-dtudy

Use ComplexVectorPlot or ComplexStreamPlot to visualize a complex function of a complex variable as a vector field or with streamlines:

https://wolfram.com/xid/0h2hohphbs-itrh36

Use GeoVectorPlot to plot vectors on a map:

https://wolfram.com/xid/0h2hohphbs-d0ztmc

Use GeoStreamPlot to plot streamlines instead of vectors:

https://wolfram.com/xid/0h2hohphbs-d065t4

Possible Issues (3)Common pitfalls and unexpected behavior
Tube StreamMarkers can be distorted by the BoxRatios:

https://wolfram.com/xid/0h2hohphbs-u7hda

Carefully adjusting the BoxRatios can eliminate the tube distortion:

https://wolfram.com/xid/0h2hohphbs-gnww2a

The colors of "Arrow" and "Arrow3D" stream markers are determined at the tip of the arrow, which can result in inconsistent colors for long arrows:

https://wolfram.com/xid/0h2hohphbs-icrf5


https://wolfram.com/xid/0h2hohphbs-baechu

Wolfram Research (2021), StreamPlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/StreamPlot3D.html (updated 2022).
Text
Wolfram Research (2021), StreamPlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/StreamPlot3D.html (updated 2022).
Wolfram Research (2021), StreamPlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/StreamPlot3D.html (updated 2022).
CMS
Wolfram Language. 2021. "StreamPlot3D." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/StreamPlot3D.html.
Wolfram Language. 2021. "StreamPlot3D." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/StreamPlot3D.html.
APA
Wolfram Language. (2021). StreamPlot3D. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StreamPlot3D.html
Wolfram Language. (2021). StreamPlot3D. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StreamPlot3D.html
BibTeX
@misc{reference.wolfram_2025_streamplot3d, author="Wolfram Research", title="{StreamPlot3D}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/StreamPlot3D.html}", note=[Accessed: 19-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_streamplot3d, organization={Wolfram Research}, title={StreamPlot3D}, year={2022}, url={https://reference.wolfram.com/language/ref/StreamPlot3D.html}, note=[Accessed: 19-June-2025
]}