SliceVectorPlot3D

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

  • The following basic slice surfaces surfi can be given:
  • Automaticautomatically determine slice surfaces
    "CenterPlanes"coordinate planes through the center
    "BackPlanes"coordinate planes at the back of the plot
    "XStackedPlanes"coordinate planes stacked along the axis
    "YStackedPlanes"coordinate planes stacked along the axis
    "ZStackedPlanes"coordinate planes stacked along the axis
    "DiagonalStackedPlanes"planes stacked diagonally
    "CenterSphere"a sphere in the center
    "CenterCutSphere"a sphere with a cutout wedge
    "CenterCutBox"a box with a cutout octant
  • SliceVectorPlot3D[f,{x,xmin,xmax},] is equivalent to SliceVectorPlot3D[f,Automatic,{x,xmin,xmax},] etc.
  • The following parametrizations can be used for basic slice surfaces:
  • {"XStackedPlanes",n},generate n equally spaced planes
    {"XStackedPlanes",{x1,x2,}}generate planes for x=xi
    {"CenterCutSphere",ϕopen}cut angle ϕopen facing the view point
    {"CenterCutSphere",ϕopen,ϕcenter}cut angle ϕopen with center angle ϕcenter in the plane
  • "YStackedPlanes", "ZStackedPlanes" follow the specifications for "XStackedPlanes", with additional features shown in the scope examples.
  • The following general slice surfaces surfi can be used:
  • expr0implicit equation in x, y, and z, e.g. x y z-10
    surfaceregiona two-dimensional region in 3D, e.g. Hyperplane
    volumeregiona three-dimensional region in 3D where surfi is taken as the boundary surface, e.g. Cuboid
  • The following wrappers can be used for slice surfaces surfi:
  • Annotation[surf,label]provide an annotation
    Style[surf,style]style the surface
    Button[surf,action]define an action to execute when the surface is clicked
    EventHandler[surf,]define a general event handler for the surface
    Hyperlink[surf,uri]make the surface act as a hyperlink
    PopupWindow[surf,cont]attach a popup window to the surface
    StatusArea[surf,label]display in status area when the surface is moused over
    Tooltip[surf,label]attach an arbitrary tooltip to the surface
  • SliceVectorPlot3D has the same options as Graphics3D, with the following additions and changes:
  • AxesTruewhether to draw axes
    BoundaryStyleAutomatichow to style surface boundaries
    BoxRatios{1,1,1}ratio of height to width
    MethodAutomaticmethods to use for the plot
    PerformanceGoal$PerformanceGoalaspects of performance to try to optimize
    PlotLegendsNonelegends to include
    PlotPointsAutomaticapproximate number of samples for the slice surfaces surfi in each direction
    PlotRange{Full,Full,Full}range of x, y, z values to include
    PlotRangePaddingAutomatichow much to pad the range of values
    PlotStyleAutomaticstyle directives for each slice surface
    PlotTheme$PlotThemeoverall theme for the plot
    RegionFunction(True&)determine what region to include
    TargetUnitsAutomaticdesired units to use
    VectorColorFunctionNonehow to color vectors
    VectorColorFunctionScalingTruewhether to scale the argument to VectorColorFunction
    VectorPointsAutomaticthe number or placement of vectors to plot
    VectorScaleAutomaticthe scale and size of vectors to plot
    VectorStyleAutomatichow to draw vectors
    WorkingPrecisionMachinePrecisionprecision to use in internal computations
  • RegionFunction is supplied with x, y, z, vx, vy, vz, Norm[{vx,vy,vz}].
  • VectorColorFunction is by default supplied with scaled x, y, z, vx, vy, vz, Norm[{vx,vy,vz}].
  • Slice surfaces can be styled using a Style wrapper and PlotStyle option, with the Style wrapper taking precedence over PlotStyle. None can be used to indicate that no slice surface should be shown.

Examples

open allclose all

Basic Examples  (2)

Plot a vector field over a surface:

Plot a vector field over a surface:

Scope  (21)

Surfaces  (9)

Generate a plot over standard slice surfaces:

Standard axis-aligned stacked slice surfaces:

Standard boundary surfaces:

Plot over any surface region:

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

Plot over the surface :

Plot a vector field over multiple slice surfaces:

Specify the number of stacked planes:

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

Sampling  (3)

Use VectorPoints to specify the number of arrows:

Use RegionFunction to expose obscured slices:

The domain may be specified by a region including Cone:

A formula region including ImplicitRegion:

A mesh-based region including BoundaryMeshRegion:

Presentation  (9)

Use PlotTheme to immediately get overall styling:

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

Control the display of axes with Axes:

Label axes using AxesLabel and the whole plot using PlotLabel:

Color the vectors by their magnitude with VectorColorFunction:

Use VectorStyle to control the shape of the vectors:

Use VectorScale to control the size of the vectors:

Style the slice surface boundaries with BoundaryStyle:

TargetUnits specifies which units to use in the visualization:

Options  (46)

Axes  (3)

Axes are drawn by default:

Use Axes->False to remove the axes:

Draw only some axes:

BoundaryStyle  (1)

Style the surface boundaries:

BoxRatios  (3)

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

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

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

PerformanceGoal  (2)

Generate a higher-quality plot:

Emphasize performance, possibly at the cost of quality:

PlotLegends  (1)

No legends are included by default:

PlotRange  (2)

Show All vectors by default:

Show a select range:

PlotRangePadding  (7)

Padding is computed automatically by default:

Specify no padding for all , , and ranges:

Specify an explicit padding for all , , and ranges:

Add 10% padding to all , , and ranges:

Specify different padding for , , and ranges:

Specify padding for the range:

Use different padding forms for each dimension:

PlotTheme  (3)

Use a basic plot theme:

Override PlotTheme styles by explicitly setting options:

Compare different plot themes:

RegionFunction  (3)

Plot vectors only over certain quadrants:

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

Use any logical combination of conditions:

VectorColorFunction  (4)

Color the vectors according to their norm:

Use any named color gradient from ColorData:

Color the vectors according to their value:

Use VectorColorFunctionScaling->False to get unscaled values:

VectorColorFunctionScaling  (3)

By default, scaled values are used, in this case for the magnitude of the vectors:

Use VectorColorFunctionScaling->False to get unscaled values:

Explicitly specify the scaling for each color function argument:

VectorPoints  (4)

Use automatically determined vector points:

Use symbolic names to specify the set of field vectors:

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

Use a different number of field vectors on a regular grid:

VectorScale  (5)

Use Automatic to automatically determine vector scale:

Specify the relative size of vectors as a fraction of the diagonal of the plot range:

Use symbolic names to control the size of vectors:

Specify an absolute size for the arrowheads:

Specify arrowhead size relative to the length of the arrow:

VectorStyle  (3)

Plot a vector field using predefined shapes:

Use Graphics3D as a style for the 3D arrows:

Use Arrowheads to specify the style of the arrowheads:

3D graphics primitives without Arrowheads are scaled based on the vector scale:

WorkingPrecision  (1)

Evaluate functions using machine-precision arithmetic:

TargetUnits  (1)

Units specified by Quantity are converted to those specified by TargetUnits:

Applications  (10)

Basic Vector Fields  (3)

Constant vector fields:

A circulating flow:

Divergent flow:

Convergent flow:

Differential Equations  (4)

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

Solve the corresponding differential equation starting on the slice surfaces:

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

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:

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

For , there is stability along and instability along and :

For , there is instability along , , and :

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 :

Construct a matrix with eigenvalues , , and :

Find solutions to the corresponding differential equation:

Show vector field and solutions together:

Automate the previous example and analyze for different real and :

and :

and :

and :

and :

Fluid Dynamics  (2)

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

Compute vectors:

Visualize the vortex, with flow rotation highlighted in red:

Visualize the divergence-free field of a scalar function :

Visualize the vortices formed by these fields:

Electromagnetism  (1)

The vector field from an electrostatic potential:

The resulting force vector field:

The force field on the center planes:

The force field on equipotential surfaces:

Properties & Relations  (5)

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

Use ListSliceVectorPlot3D for data:

Use VectorPlot for vector plots in 2D:

Use StreamPlot or LineIntegralConvolutionPlot for vector fields in 2D:

Plot complex numbers as a vector field:

Introduced in 2015
 (10.2)