ListDensityPlot3D

ListDensityPlot3D[farr]

generates a smooth density plot from an array of values farr.

ListDensityPlot3D[{{x1,y1,z1,f1},,{xn,yn,zn,fn}}]

generates a density plot with values fi at the specified points {xi,yi,zi}.

Details and Options

Examples

open allclose all

Basic Examples  (2)

Plot the density for an array of values:

Use a different color scheme and legend:

Scope  (15)

Data  (7)

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

Provide explicit , , and data ranges by using DataRange:

Give explicit , , , coordinates for points in a density:

For irregular data , the , , and data ranges are inferred from data:

Use RegionFunction to constrain data inclusion more generally:

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

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

Use ClipPlanes to specify one or several clipping planes. In this case, clip :

Presentation  (8)

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 function values with ColorFunction:

Use a custom opacity function to specify the opacity for each point volume:

TargetUnits specifies which units to use in the visualization:

Use ScalingFunctions in the x direction:

Options  (38)

BoxRatios  (3)

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

Use BoxRatiosAutomatic to show the natural scale of the 3D coordinate values:

Specify the ratios between the bounding box lengths:

ClipPlanes  (3)

Use ClipPlanes to specify a clipping plane. In this case, clip :

Specify several clip planes, in this case clipping and :

Compare to the general RegionFunction:

ColorFunction  (2)

Color by scaled f value at x, y, z coordinates:

Use color functions from ColorData:

ColorFunctionScaling  (2)

Parameters to ColorFunction are normally scaled to be between 0 and 1:

Use unscaled coordinates by setting ColorFunctionScaling to False:

DataRange  (2)

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

Explicitly specify the data range:

MaxPlotPoints  (1)

Specify the maximum number of data points:

By default, use all the data:

OpacityFunction  (5)

OpacityFunction is Automatic by default:

Use None to make the whole volume opaque:

Use a custom opacity function to specify the opacity for each point volume:

Make values in the intervals and more opaque:

Use a constant opacity Opacity[0.05]:

OpacityFunctionScaling  (2)

By default, scaled values are used:

Use unscaled density values by setting OpacityFunctionScaling to False:

PerformanceGoal  (2)

Generate a higher-quality plot:

Emphasize performance, possibly at the cost of quality:

PlotLegends  (2)

No legends are used by default:

Use PlotLegends->Automatic to show a legended plot:

PlotRange  (3)

By default, the full plot range is shown:

Use specific ranges to show more detail:

Show only function values between 0 and 0.2:

Alternatively:

PlotTheme  (3)

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

Turn off the grid lines:

Compare different plot themes:

RegionFunction  (3)

Plot over a ball in , , and :

Show only areas where :

Regions do not have to be connected:

ScalingFunctions  (4)

By default, plots have linear scales in all directions:

Create a plot with a log-scaled axis:

Use ScalingFunctions to scale to reverse the coordinate direction in the direction:

Use a scale defined by a function and its inverse:

TargetUnits  (1)

Specify which units to use in the visualization:

Applications  (13)

Elementary Functions  (4)

Plot the function :

Plot the functions and :

Plot the functions and :

Plot the functions and :

Plot the functions and :

Plot the functions and :

Plot , a product of univariate functions:

Plot and , univariate and bivariate functions:

Plot , a trivariate function:

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

Pick the points randomly in a box:

Simulation Data  (6)

Plot a probability density function of three variables:

Simulate the distribution and compute the bin counts:

Simulate a random walk and show the path:

Bin the position that the walk hits in space and show the density:

Plot the evolution of two-dimensional cellular automata:

Generate a Menger sponge array:

Plot the evolution of a substitution system:

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

Data Patterns  (3)

Visualize the phase for a 3D discrete Fourier transform on data:

Bin the position of atoms in a protein and show the density:

Compare with the molecule plot:

Visualize MRI data from a brain:

To get the same orientation used by Image3D, use the option DataReversed:

Properties & Relations  (6)

Use ListSliceDensityPlot3D for density plots over slice surfaces:

Use ListDensityPlot for density plots in 2D:

Use DensityPlot3D for functions:

Use ListSliceContourPlot3D for contours over slice surfaces:

Use ListContourPlot3D for constant value surfaces:

Use ArrayPlot3D for discrete data:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

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