ArrayPlot3D

ArrayPlot3D[array]

generates a plot in which the values in an array are shown in a discrete array of cubes.

Details and Options

Examples

open allclose all

Basic Examples  (4)

Plot an array of numbers:

Display the state of a 3D cellular automaton:

Specify overall color rules:

Use a standard blend as a color function:

Scope  (6)

By default, 0 is not plotted and 1 is plotted in black:

With no opacity, 0 is plotted in white:

Plot data with units:

Plot a ragged array, padding on the right:

Cells with value None are rendered like the background:

Plot a sparse array:

Options  (32)

AspectRatio  (2)

Make all cells cubes:

Use a different aspect ratio:

By default, ArrayPlot3D does not show any axes:

AxesLabel  (3)

No axis labels are drawn by default:

Place a label on the axis:

Specify axes labels:

AxesStyle  (4)

Change the style for the axes:

Specify the style of each axis:

Use different styles for the ticks and the axes:

Use different styles for the labels and the axes:

ClippingStyle  (1)

The default is to not show values outside the plot range:

Show values outside the plot range in red:

Show low values in gray and high values in green:

ColorFunction  (2)

Map values from 0 to 1 onto colors according to Hue:

Use a pure function as the color function:

Use a named color gradient from ColorData:

Show elements with value 1 as black and all others as white:

ColorFunctionScaling  (1)

With ColorFunctionScaling->True, the values are first scaled to lie between 0 and 1:

ColorRules  (1)

Specify color rules for explicit values or patterns:

ColorFunction is used if no color rules apply:

Implement a "default color" by adding a rule for _:

Use any patterns in ColorRules:

Rules are used in the order given:

DataRange  (1)

By default, array values are assumed to have integer i, j and k values:

Specify the i, j, k coordinate range for tabular data:

DataReversed  (1)

Reverse the order of j and k values:

Reverse the order of i, j and k values:

Mesh  (1)

Insert mesh lines between all cells:

MeshStyle  (1)

Default mesh style:

Make the mesh pink:

OpacityFunction  (4)

OpacityFunction is Automatic by default:

Use None to make the whole array opaque:

Use a custom opacity function to specify the opacity for each value:

Use a constant opacity Opacity[0.5]:

OpacityFunctionScaling  (2)

By default, scaled values are used:

Use unscaled values by setting OpacityFunctionScaling to False:

PlotLegends  (2)

No legend is used by default:

Generate a legend automatically:

PlotLegends automatically picks up ColorFunction:

PlotRange  (2)

Plot all elements:

Plot only elements with values up to 3, leaving the rest empty:

The first three entries in PlotRange specify the range of i, j and k values to include:

Plot positive elements only:

PlotTheme  (1)

Use a theme with detailed ticks and a legend:

Ticks  (2)

Put ticks at round numbers:

Ticks at specific values:

Applications  (6)

Cellular Automata  (2)

Plot the state of a 3D cellular automaton:

Plot the evolution of a 2D three-color cellular automaton:

Array Structures  (4)

Highlight a specific element in an array:

Highlight a column of values:

Highlight a slice of an array:

Highlight a sub-block of values:

Properties & Relations  (6)

Use ArrayPlot or MatrixPlot for 2D arrays:

ArrayPlot3D uses 3D arrays, even if one of the dimensions is 1:

Raster3D arranges elements in the opposite orders from ArrayPlot3D:

The DataReversed option allows ArrayPlot3D to use the same order as Raster3D:

Use ListDensityPlot3D for continuous densities, using varying opacity to see interior features:

Image3D uses interpolated volumetric rendering to display the data:

ReliefPlot creates artificial shadows for 2D data:

Use ComplexArrayPlot for 2D arrays of complex-valued data:

Neat Examples  (3)

Plot the Sin function at integer points:

Evolution of a totalistic 3D cellular automaton:

Interactively map GCD values onto colors using Hue:

Wolfram Research (2020), ArrayPlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/ArrayPlot3D.html.

Text

Wolfram Research (2020), ArrayPlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/ArrayPlot3D.html.

CMS

Wolfram Language. 2020. "ArrayPlot3D." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ArrayPlot3D.html.

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_arrayplot3d, organization={Wolfram Research}, title={ArrayPlot3D}, year={2020}, url={https://reference.wolfram.com/language/ref/ArrayPlot3D.html}, note=[Accessed: 21-December-2024 ]}