WOLFRAM

SliceVectorPlot3D[{vx,vy,vz},surf,{x,xmin,xmax},{y,ymin,ymax},{z,zmin,zmax}]

generates a vector plot of the field {vx,vy,vz} over the slice surface surf.

SliceVectorPlot3D[{vx,vy,vz},surf,{x,y,z}reg]

restricts the surface surf to be within the region reg.

SliceVectorPlot3D[{vx,vy,vz},{surf1,surf2,},]

generates vector plots over several slice surfaces surfi.

Details and Options

Examples

open allclose all

Basic Examples  (2)Summary of the most common use cases

Plot a vector field over a surface:

Out[1]=1

Plot a vector field over a surface:

Out[1]=1

Scope  (28)Survey of the scope of standard use cases

Surfaces  (9)

Generate a plot over standard slice surfaces:

Out[1]=1

Standard axis-aligned stacked slice surfaces:

Out[1]=1

Standard boundary surfaces:

Out[1]=1

Plot over any surface region:

Out[1]=1

Plotting over a volume primitive is equivalent to plotting over RegionBoundary[reg]:

Out[1]=1

Plot over the surface :

Out[1]=1

Plot a vector field over multiple slice surfaces:

Out[1]=1

Specify the number of stacked planes:

Out[1]=1

Specify the cutting angle for a center-cut sphere slice:

Out[1]=1

Sampling  (3)

Use VectorPoints to specify the number of arrows:

Out[1]=1

Use RegionFunction to expose obscured slices:

Out[1]=1

The domain may be specified by a region including Cone:

Out[1]=1

A formula region including ImplicitRegion:

Out[3]=3

A mesh-based region including BoundaryMeshRegion:

Out[4]=4
Out[5]=5

Presentation  (16)

Use VectorScaling to show arrows scaled according to their magnitudes:

Out[1]=1

Use VectorSizes to prevent arrows from being too small:

Out[1]=1

Use VectorRange to control which vectors are plotted:

Out[1]=1

Use ClippingStyle to control the appearance of the clipped vectors:

Out[1]=1

Use PlotTheme to immediately get overall styling:

Out[1]=1

Use PlotLegends to get a color bar for the different values:

Out[1]=1

Control the display of axes with Axes:

Out[1]=1

Label axes using AxesLabel and the whole plot using PlotLabel:

Out[1]=1

Color the vectors by their magnitude with VectorColorFunction:

Out[1]=1

Use VectorMarkers to control the shape of the vectors:

Out[1]=1

Use VectorAspectRatio to modify the width-to-length ratio of the arrows:

Out[1]=1

Style the slice surface boundaries with BoundaryStyle:

Out[1]=1

Highlight a RegionFunction with RegionBoundaryStyle:

Out[1]=1

Style a RegionFunction with RegionBoundaryStyle:

Out[1]=1

TargetUnits specifies which units to use in the visualization:

Out[1]=1

Scale the axes in a plot:

Out[1]=1

Options  (60)Common values & functionality for each option

BoundaryStyle  (1)

Style the surface boundaries:

Out[1]=1

BoxRatios  (3)

By default, the edges of the bounding box have the same length:

Out[1]=1

Use BoxRatios->Automatic to show the natural scale of the 3D coordinate values:

Out[1]=1

Use custom length ratios for each side of the bounding box:

Out[1]=1

ClippingStyle  (4)

By default, clipped vectors are given a constant color that is consistent with the minimum or maximum vector lengths given by VectorRange:

Out[1]=1

Suppress the clipped vectors:

Out[1]=1

Style the clipped vectors:

Out[1]=1

Style the short and long clipped vectors differently:

Out[1]=1

PerformanceGoal  (2)

Generate a higher-quality plot:

Out[1]=1

Emphasize performance, possibly at the cost of quality:

Out[1]=1

PlotLegends  (3)

No legends are included by default:

Out[1]=1

Include a legend that indicates the vector norms by color:

Out[1]=1

With multiple fields and VectorColorFunction set to None, use a legend to identify each field:

Out[1]=1

Or use the fields in the legend:

Out[2]=2

PlotRange  (2)

Show All vectors by default:

Out[1]=1

Show a selected range:

Out[1]=1

PlotRangePadding  (7)

Padding is computed automatically by default:

Out[1]=1

Specify no padding for all , , and ranges:

Out[1]=1

Specify an explicit padding for all , , and ranges:

Out[1]=1

Add 10% padding to all , , and ranges:

Out[1]=1

Specify different padding for , , and ranges:

Out[1]=1

Specify padding for the range:

Out[1]=1

Use different padding forms for each dimension:

Out[1]=1

PlotTheme  (3)

Use a basic plot theme:

Out[1]=1

Override PlotTheme styles by explicitly setting options:

Out[1]=1

Compare different plot themes:

Out[1]=1

RegionBoundaryStyle  (3)

By default, a region function is not explicitly shown:

Out[1]=1

A similar effect can be created by combining VectorRange and ClippingStyle:

Out[2]=2

Show the boundary of a region defined by a region function:

Out[1]=1

Style the boundary of the region:

Out[1]=1

RegionFunction  (3)

Plot vectors only over certain quadrants:

Out[1]=1

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

Out[1]=1

Use any logical combination of conditions:

Out[1]=1

ScalingFunctions  (4)

By default, plots have linear scales in all directions:

Out[1]=1

Create a plot with a reversed axis:

Out[1]=1

Scaling functions are applied to slices that are defined in terms of the variables:

Out[1]=1

Slice surfaces that are defined relative to the bounding box are unaffected by scaling functions:

Out[1]=1

VectorAspectRatio  (1)

VectorAspectRatio specifies the width of the arrow over its length:

Out[1]=1

VectorColorFunction  (5)

By default, vectors are colored according to their norm:

Out[1]=1

Change the color function:

Out[1]=1

Use any named color gradient from ColorData:

Out[1]=1

Color the vectors according to their value:

Out[1]=1

Use VectorColorFunctionScaling->False to get unscaled values:

Out[1]=1

VectorColorFunctionScaling  (3)

By default, scaled values are used:

Out[1]=1

Use VectorColorFunctionScaling->False to get unscaled values:

Out[1]=1

Explicitly specify the scaling for each color function argument:

Out[1]=1

VectorMarkers  (3)

The default vector marker is "Arrow3D":

Out[1]=1

Use other named markers:

Out[1]=1

By default, arrows are centered at sampled points. Use Placed to start the arrow at the sampled point:

Out[1]=1

VectorPoints  (4)

Use automatically determined vector points:

Out[1]=1

Use symbolic names to specify the set of field vectors:

Out[1]=1

Create a regular grid of field vectors with the same number of arrows for , , and :

Out[1]=1

Use a different number of vectors in each direction:

Out[1]=1

VectorRange  (3)

Specify the range of vector norms that are displayed with varying color:

Out[1]=1

Combine with ClippingStyle to remove the clipped vectors:

Out[1]=1

Or specify a different style for clipped vectors:

Out[1]=1

VectorScaling  (3)

By default, arrows are displayed with a constant length:

Out[1]=1

Use Automatic to scale arrows proportionally to the corresponding vector norm:

Out[1]=1

Use VectorSizes to specify the range of relative lengths of the arrows:

Out[1]=1

VectorSizes  (2)

Make the vectors half of the default size:

Out[1]=1

With VectorScaling, VectorSizes controls the range of the lengths of the arrows relative to the default size:

Out[1]=1

VectorStyle  (1)

VectorColorFunction has precedence over VectorStyle:

Out[1]=1
Out[2]=2

Applications  (23)Sample problems that can be solved with this function

Basic Vector Fields  (3)

Constant vector fields:

Out[2]=2
Out[3]=3

A circulating flow around the axis:

Out[1]=1

Divergent flow:

Out[1]=1

Convergent flow:

Out[2]=2

Differential Equations  (9)

Illustrate the behavior of a linear system of differential equations in the case when is diagonal:

Out[2]=2

Solve the corresponding differential equation starting on the slice surfaces:

Out[5]=5

The differential equation solution follows the arrows in the plot all converging to the origin:

Out[6]=6

Automate the previous example and analyze all the possible sign combinations of the real eigenvalues for , where is a diagonal matrix with eigenvalues :

For , there is stability along the , , and directions:

Out[2]=2

For , there is stability along and , but instability along :

Out[3]=3

For , there is stability along and instability along and :

Out[4]=4

For , there is instability along , , and :

Out[5]=5

Define a matrix and compute its eigenvalues:

Out[1]=1

Since is symmetric, its eigenspaces , and are mutually orthogonal:

Out[2]=2

Generate the orthogonal complements of the eigenspaces:

Out[3]=3

Plot the vector field and observe the effects of the eigenvalues:

Out[4]=4

The plane orthogonal to contains and , so the origin is attractive in and repulsive in :

Out[5]=5

The plane orthogonal to contains and , so the field points directly toward :

Out[6]=6

The plane orthogonal to contains and , so the field points directly away from :

Out[7]=7

Define a matrix and compute its eigenvalues:

Out[1]=1

The eigenvalues and eigenvectors of indicate a sink at the origin for the vector field with spiral behavior around the axis:

Out[2]=2

Examine the vector field in planes orthogonal to :

Out[3]=3

Compute solutions of the linear system of differential equations for several initial conditions:

Add the solutions of to the vector field:

Out[5]=5

Define a new matrix and compute its eigenvalues and eigenvectors:

Out[6]=6

The eigenspace is a plane through the origin with normal , so solutions of are attracted to the origin while spiraling around :

Out[9]=9

Illustrate the behavior of a linear system of differential equations in the case when is block diagonal, with one real and two complex conjugate eigenvalues. The matrix has eigenvalues , , and :

Out[1]=1

Construct a matrix with eigenvalues , , and :

Out[3]=3

Find solutions to the corresponding differential equation:

Out[6]=6

Show vector field and solutions together:

Out[7]=7

Automate the previous example and analyze for different real and :

and :

Out[2]=2

and :

Out[3]=3

and :

Out[4]=4

and :

Out[5]=5

Solve an initial value problem with a solution that is contained in a cylinder:

Out[1]=1

Graph the surface, the vector field on the surface and the solution of the initial value problem:

Out[2]=2

Solve an initial value problem with a solution contained in a sphere:

Out[1]=1

Graph the surface, the vector field on the surface and the solution of the initial value problem:

Out[2]=2

Solve an initial value problem with a solution contained in a hyperbolic paraboloid:

Out[1]=1

Graph the surface, the vector field on the surface and the solution of the initial value problem:

Out[2]=2

Fluid Dynamics  (2)

Visualize Hill's spherical vortex, with vortex radius and velocity :

Compute vectors:

Visualize the vortex, with flow rotation highlighted in red:

Out[8]=8

Visualize the divergence-free field of a scalar function :

Visualize the vortices formed by these fields:

Out[3]=3
Out[4]=4

Solid Mechanics  (2)

Visualize forces on surfaces.

A solid cylinder with a tensile load:

Out[1]=1

A solid cylinder with a compressive load:

Out[2]=2

A hollow cylinder with internal and external pressures:

Out[3]=3

An elastic bar in the shape of a circular cylinder with radius 1 has a net torque applied at both ends. The resulting displacement field is , where is the shear modulus, the nonzero stresses are and and the forces on the surfaces are the tractions:

Display the applied forces:

Out[3]=3

Display the displacement field that results from the applied forces:

Out[5]=5

Electromagnetism  (1)

The vector field from an electrostatic potential:

The resulting force vector field:

Out[3]=3

The force field on the center planes:

Out[4]=4

The force field on equipotential surfaces:

Out[5]=5

Flux  (3)

Visualize the outward pointing unit normal vectors to a surface:

Out[3]=3

Define vector field and compute the unit normals to the surface :

Out[2]=2

Visualize the vector field and the unit normals to :

Out[3]=3

The flux density of through is zero since is orthogonal to the normals of :

Out[4]=4

Define vector field and compute the unit normals to the surface :

Out[2]=2

Visualize the vector field and the unit normals to :

Out[3]=3

Compute the flux density of through :

Out[4]=4

The total flux is zero because the negative flux is canceled by the positive flux. Visualize this by coloring the surface by the flux density:

Out[5]=5

Other Applications  (3)

Visualize the "hairy ball theorem" (https://mathworld.wolfram.com/HairyBallTheorem.html) that, loosely speaking, says that you cannot comb the hair on a sphere without leaving a whorl:

Out[1]=1

Show a vector field in a tangent plane:

Out[1]=1

Choose 10 random points on the unit sphere:

Compute the angles ϕ and θ for the points at :

Plot geodesics from to the target points:

Show the sphere, geodesics, target points, and a vector field of tangents for the geodesics:

Out[4]=4

Properties & Relations  (10)Properties of the function, and connections to other functions

Use VectorPlot3D for a full volume visualization of the vector field:

Out[1]=1

Use ListSliceVectorPlot3D for data:

Out[2]=2

Use VectorPlot for vector plots in 2D:

Out[1]=1

Use StreamPlot or LineIntegralConvolutionPlot for vector fields in 2D:

Out[1]=1

Use VectorDensityPlot to add a density plot of a scalar field:

Out[1]=1

Use StreamDensityPlot to use streams instead of vectors:

Out[2]=2

Use VectorDisplacementPlot to visualize the effect of a displacement vector field on a specified region:

Out[1]=1

Use VectorDisplacementPlot3D to visualize the effect of a displacement vector field on a specified 3D region:

Out[1]=1

Use StreamPlot3D to plot 3D fields as streamlines:

Out[1]=1

Plot complex functions as a vector field with ComplexVectorPlot:

Out[1]=1

Plot streams instead of vectors with ComplexStreamPlot:

Out[2]=2

Use GeoVectorPlot to plot vectors on a map:

Out[1]=1

Use GeoStreamPlot to use streams instead of vectors:

Out[2]=2
Wolfram Research (2015), SliceVectorPlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/SliceVectorPlot3D.html (updated 2022).
Wolfram Research (2015), SliceVectorPlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/SliceVectorPlot3D.html (updated 2022).

Text

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

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

CMS

Wolfram Language. 2015. "SliceVectorPlot3D." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/SliceVectorPlot3D.html.

Wolfram Language. 2015. "SliceVectorPlot3D." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/SliceVectorPlot3D.html.

APA

Wolfram Language. (2015). SliceVectorPlot3D. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SliceVectorPlot3D.html

Wolfram Language. (2015). SliceVectorPlot3D. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SliceVectorPlot3D.html

BibTeX

@misc{reference.wolfram_2025_slicevectorplot3d, author="Wolfram Research", title="{SliceVectorPlot3D}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/SliceVectorPlot3D.html}", note=[Accessed: 15-March-2025 ]}

@misc{reference.wolfram_2025_slicevectorplot3d, author="Wolfram Research", title="{SliceVectorPlot3D}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/SliceVectorPlot3D.html}", note=[Accessed: 15-March-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_slicevectorplot3d, organization={Wolfram Research}, title={SliceVectorPlot3D}, year={2022}, url={https://reference.wolfram.com/language/ref/SliceVectorPlot3D.html}, note=[Accessed: 15-March-2025 ]}

@online{reference.wolfram_2025_slicevectorplot3d, organization={Wolfram Research}, title={SliceVectorPlot3D}, year={2022}, url={https://reference.wolfram.com/language/ref/SliceVectorPlot3D.html}, note=[Accessed: 15-March-2025 ]}