ListSliceContourPlot3D

ListSliceContourPlot3D[farr,surf]

generates a contour plot of the three-dimensional farr of values sliced to the surface surf.

ListSliceContourPlot3D[{{x1,y1,z1,f1},{x2,y2,z2,f2},},surf]

generates a slice contour plot for the values fi at points {xi,yi,zi}.

ListSliceContourPlot3D[,{surf1,surf2,}]

generates slice contour plots over several slices surf1, surf2, .

Details and Options

  • ListSliceContourPlot3D gives smooth contours on surfaces in a volume.
  • ListSliceContourPlot3D constructs contour curves on the surface surf corresponding to the level sets where the interpolated function has constant values d1, d2, etc. By default, the regions between the curves are shaded to more easily identify regions whose values are between di and di+1.
  • For regular data, the function has value farr[[i,j,k]] at .
  • For irregular data, has value fi at .
  • It visualizes the surfaces where the region is the Cartesian product for regular data and the convex hull of {{x1,y1,z1},,{xn,yn,zn}} for irregular data.
  • 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 axis
    "YStackedPlanes"coordinate planes stacked along axis
    "ZStackedPlanes"coordinate planes stacked along 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
  • ListSliceContourPlot3D[data] is equivalent to ListSliceContourPlot3D[data,Automatic].
  • 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 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:
  • 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
    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
  • ListSliceContourPlot3D has the same options as Graphics3D, with the following additions and changes:
  • AxesTruewhether to draw axes
    BoundaryStyle Automatichow to style surface boundaries
    BoxRatios {1,1,1}bounding 3D box ratios
    ClippingStyle Nonehow to draw values clipped by PlotRange
    ColorFunction Automatichow to color the plot
    ColorFunctionScaling Truewhether to scale the arguments to ColorFunction
    Contours Automatichow many or what contours to show on each surface
    ContourShading Automatichow to shade regions between contours
    ContourStyle Automaticthe style for contour lines
    DataRange Automaticthe range of x, y, and z values to assume for data
    PerformanceGoal $PerformanceGoalaspects of performance to optimize
    PlotLegends Nonelegends for color gradients
    PlotPoints Automaticapproximate number of samples for the slice surfaces surfi in each direction
    PlotRange {Full,Full,Full,Automatic}range of f or other values to include
    PlotTheme $PlotThemeoverall theme for the plot
    RegionFunction (True&)how to determine whether a point should be included
    ScalingFunctions Nonehow to scale individual coordinates
    TargetUnits Automaticdesired units to use
  • ColorFunction is by default supplied with the scaled value of f.
  • RegionFunction is by default supplied with x, y, z, and f.
  • For a farr of dimension {r,s,t}, the setting DataRangeAutomatic is equivalent to DataRange{{1,r},{1,s},{1,t}}.
  • Possible settings for ScalingFunctions include:
  • sfscale the fcontour values
    {sx,sy,sz}scale x, y and z axes
    {sx,sy,sz,sf}scale x, y and z axes and fcontour values
  • 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

Examples

open allclose all

Basic Examples  (2)

Plot the contours of an array of values over a set of surfaces:

Plot the contours over the surface :

Scope  (28)

Surfaces  (9)

Generate a contour plot over standard slice surfaces:

Standard axis-aligned stacked slice surfaces:

Standard boundary surfaces:

Plot the contours over any surface region:

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

Plot the contours over the surface :

Plot the contours over multiple surfaces:

Specify the number of stacked planes:

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

Data  (8)

For regular data consisting of values, the , , and data reflects its positions in the array:

Provide explicit , , and data ranges by using DataRange:

Plot interpolated contours from irregular data consisting of (, , , ) tuples:

Show the points where the data values are provided:

Plot the contours for an array of values given by SparseArray:

Plot the density for an array of values given by QuantityArray:

Use Contours to specify the number of contours:

Or the list of function values to put contours:

Use PlotPoints to control sampling of surfaces:

Areas where the function becomes nonreal are excluded:

Use RegionFunction to expose obscured slices:

Presentation  (11)

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 plot by the data values with ColorFunction:

Style regions between contours with ContourShading:

Use ContourStyle to style the contour lines:

Style the slice surface boundaries with BoundaryStyle:

TargetUnits specifies which units to use in the visualization:

Create a plot with a log-scaled axis:

Reverse the coordinate direction in the direction:

Options  (40)

BoundaryStyle  (1)

Style the slice surface boundaries with BoundaryStyle:

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:

ClippingStyle  (2)

Color clipped regions:

Remove clipped regions with None:

ColorFunction  (3)

Color the contours according to the values:

Use a named color gradient from ColorData:

Use red when :

ColorFunctionScaling  (2)

By default, scaled values are used:

Use ColorFunctionScaling->False to get unscaled values:

Contours  (4)

Use automatic contour selection:

Use 5 equally spaced contours:

Specify an explicit set of contours:

Use specific contours with specific styles:

ContourStyle  (1)

Style the contour lines yellow:

ContourShading  (4)

ContourShadingAutomatic computes contour region shading from the ColorFunction:

Cyclically repeat shading styles:

Leave every third contour region empty, starting from the second:

Leave the regions between contours blank:

DataRange  (2)

By default, the data range is taken to be the dimension of the array:

Explicitly specify the data range:

PerformanceGoal  (2)

Generate a higher-quality plot:

Emphasize performance, possibly at the cost of quality:

PlotLegends  (1)

PlotLegends automatically picks up Contours and ContourShading:

PlotPoints  (1)

Use more plot points for finer surface discretization and more detailed data interpolation:

PlotRange  (3)

Show All contours by default:

Show a select range:

Show a select range including the values:

PlotTheme  (3)

Use a theme with detailed grid lines, ticks, and legends:

Any option setting overrides PlotTheme settings, in this case removing face grids:

Compare different plot themes:

RegionFunction  (1)

Include only the contours where or :

ScalingFunctions  (6)

By default, plots have linear scales in all directions:

Create a plot with a log-scaled axis:

Reverse the coordinate direction in the direction:

Use a scale defined by a function and its inverse:

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

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

TargetUnits  (1)

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

Applications  (10)

Basic Data  (4)

Plot contour slices of data generated by :

Contours of the data generated from and :

Data generated from and :

Data generated from and :

Data from and :

Data from and :

Data from , a product of univariate functions:

Data from and , univariate and bivariate functions:

Plot contour slices of the function , a trivariate function:

Plot contour slices of a sum of exponentials sum_ialpha_i exp(-TemplateBox[{{p, -, {p, _, i}}}, Norm]^2):

Pick the points randomly in a box and plot contour slices from them:

Simulation Data  (4)

Plot contour slices of a probability density function of three variables:

Sample and plot the function:

Simulate the distribution, compute the bin counts, and plot contour slices:

Plot contour slices of the evolution of two-dimensional cellular automata:

Sample every tenth generation, with time evolving in the direction:

Or look at how the cells along a center line evolve over time:

Generate a Menger sponge array and plot contour slices from it:

Simulate a discrete diffusion model of a two-dimensional array of random values by averaging values of a radius-1 neighborhood in the array, and plot contour slices:

Time evolves along the axis, with snapshots at times 1, 5, and 15:

Empirical Data  (2)

Bin the position of atoms in a protein, and plot contour density slices from it:

Show the concentration of atoms with the axes in picometers:

Visualize MRI data from a brain:

Properties & Relations  (5)

Use ListSliceDensityPlot3D for continuous densities on surfaces:

Use ListContourPlot3D for constant value surfaces:

Use ListDensityPlot3D for full volume visualization of the data values:

Use SliceContourPlot3D for functions:

Use ListContourPlot for contour plots in 2D:

Possible Issues  (1)

Slice surfaces with a constant value appear noisy:

The function is constant on the chosen slice surface:

Choosing a different slice surface gives a reasonable picture of the function:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2022_listslicecontourplot3d, author="Wolfram Research", title="{ListSliceContourPlot3D}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/ListSliceContourPlot3D.html}", note=[Accessed: 27-May-2023 ]}

BibLaTeX

@online{reference.wolfram_2022_listslicecontourplot3d, organization={Wolfram Research}, title={ListSliceContourPlot3D}, year={2022}, url={https://reference.wolfram.com/language/ref/ListSliceContourPlot3D.html}, note=[Accessed: 27-May-2023 ]}