ArrayPlot3D
ArrayPlot3D[array]
generates a plot in which the values in an array are shown in a discrete array of cubes.
Details and Options




- ArrayPlot3D[array] by default arranges the array elements aijk with increasing values of i going from top to bottom, j from back to front and k from left to right.
- Possible forms of array include:
-
{{{a111,…,a11t},…,{a1s1,…,a1st}},…,{{ar11,…,ar1t},…,{ars1,…,arst}}} normal array SparseArray values as a normal array QuantityArray magnitudes NumericArray values as a normal array SymmetrizedArray values as a normal array Dataset values as a normal array - If array is ragged, shorter dimensions are treated as padded on the right with empty space.
- If array contains 0s and 1s, the 1s will appear as black cubes and the 0s as empty space.
- ArrayPlot3D has the same options as Graphics3D, with the following additions and changes:
-
Axes False whether to draw axes Boxed True whether to draw the bounding box ClippingStyle None how to show cells whose values are clipped ColorFunction Automatic how each cell should be colored ColorFunctionScaling True whether to scale the argument to ColorFunction ColorRules Automatic rules for determining colors from values DataRange All the range of and
values to assume
DataReversed False whether to reverse the order of rows Lighting "Neutral" whether to use lighting Mesh Automatic whether to draw a mesh MeshStyle Automatic the style to use for a mesh Method Automatic the method to use for displaying the array MissingStyle Automatic the style to use for missing values OpacityFunction Automatic how to compute the opacity at each cell OpacityFunctionScaling True whether to scale the arguments to OpacityFunction PerformanceGoal $PerformanceGoal aspects of performance to try to optimize PlotLegends None legends for datasets PlotRange All the range of values to plot PlotTheme $PlotTheme overall theme for the plot TargetUnits Automatic units to display in the plot - The rules given by ColorRules are applied to the value aijk of each cell. The rules can involve patterns.
- If none of the rules in ColorRules apply, then ColorFunction is used to determine the color.
- With the default setting ColorRules->Automatic, an explicit setting ColorFunction->f is used instead of ColorRules.
- If the color determined for a particular cell is None, the cell is treated as empty space.
- If no color is determined for a particular cell, the cell is rendered in the color given by MissingStyle, by default a dark red color.
- ColorFunction and OpacityFunction are supplied with a single argument, given by default by the value of aijk scaled to be between 0 and 1.
- With DataReversed->True, the order of rows is reversed, so that rows run from bottom to top, with the last row at the top.
- With the setting TicksAutomatic, ticks are placed at round integers, typically multiples of 5 or 10.
- With the setting TicksAll, ticks are also placed at the minimum and maximum values of i, j and k.
- In explicit Ticks specifications, the tick coordinates are taken to refer to i, j and k.
- PlotRange can take the following forms:
-
amax show aijk values between 0 and amax {amin,amax} show aijk values between amin and amax {rangei,rangej,rangek} show aijk values with i in rangei, … {rangei,rangej,rangek,rangea} show aijk values with i in rangei, … and aijk in rangea - The array index ranges rangei, rangej and rangek can take the following forms:
-
{min,max} include indices between min and max All include all indices - Typical settings for PlotLegends include:
-
None no legend Automatic automatically determine legend Placed[lspec,…] specify placement for legend - Possible settings for Mesh include:
-
Automatic automatically show the mesh None do not show the mesh Full show mesh adjacent to filled array cells All show mesh adjacent to all array cells {speci,specj,speck} show the mesh in particular dimensions - The possible settings for Method include "Graphics3D", "Raster3D" and "ArrayMesh".

Examples
open allclose allBasic Examples (4)
Scope (6)
By default, 0 is not plotted and 1 is plotted in black:
With no opacity, 0 is plotted in white:
Plot a ragged array, padding on the right:
Cells with value None are rendered like the background:
Options (32)
AspectRatio (2)
AxesStyle (4)
ClippingStyle (1)
ColorFunction (2)
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:
DataRange (1)
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)
PlotLegends (2)
Generate a legend automatically:
PlotLegends automatically picks up ColorFunction:
PlotRange (2)
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:
Applications (6)
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:
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