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: [List of all options]
-
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".
-
AlignmentPoint Center the default point in the graphic to align with AspectRatio Automatic ratio of height to width Axes False whether to draw axes AxesEdge Automatic on which edges to put axes AxesLabel None axes labels AxesOrigin Automatic where axes should cross AxesStyle {} graphics directives to specify the style for axes Background None background color for the plot BaselinePosition Automatic how to align with a surrounding text baseline BaseStyle {} base style specifications for the graphic Boxed True whether to draw the bounding box BoxRatios Automatic bounding 3D box ratios BoxStyle {} style specifications for the box ClippingStyle None how to show cells whose values are clipped ClipPlanes None clipping planes ClipPlanesStyle Automatic style specifications for clipping planes 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 ContentSelectable Automatic whether to allow contents to be selected ControllerLinking False when to link to external rotation controllers ControllerPath Automatic what external controllers to try to use DataRange All the range of and values to assume DataReversed False whether to reverse the order of rows Epilog {} 2D graphics primitives to be rendered after the main plot FaceGrids None grid lines to draw on the bounding box FaceGridsStyle {} style specifications for face grids FormatType TraditionalForm default format type for text ImageMargins 0. the margins to leave around the graphic ImagePadding All what extra padding to allow for labels, etc. ImageSize Automatic absolute size at which to render the graphic LabelStyle {} style specifications for labels 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 PlotLabel None a label for the plot PlotLegends None legends for datasets PlotRange All the range of values to plot PlotRangePadding Automatic how much to pad the range of values PlotRegion Automatic final display region to be filled PlotTheme $PlotTheme overall theme for the plot PreserveImageOptions Automatic whether to preserve image options when displaying new versions of the same graphic Prolog {} 2D graphics primitives to be rendered before the main plot RotationAction "Fit" how to render after interactive rotation SphericalRegion Automatic whether to make the circumscribing sphere fit in the final display area TargetUnits Automatic units to display in the plot Ticks Automatic specification for ticks TicksStyle {} style specification for ticks TouchscreenAutoZoom False - whether to zoom to fullscreen when activated on a touchscreen
ViewAngle Automatic angle of the field of view ViewCenter Automatic point to display at the center ViewMatrix Automatic explicit transformation matrix ViewPoint {1.3,-2.4,2.} viewing position ViewProjection Automatic projection method for rendering objects distant from the viewer ViewRange All range of viewing distances to include ViewVector Automatic position and direction of a simulated camera ViewVertical {0,0,1} direction to make vertical
List of all options
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