We deliver solutions for the AI eraâcombining symbolic computation, data-driven insights and deep technology expertise.
MatrixPlot[m]
generates a plot that gives a visual representation of the values of elements in a matrix.
Details and Options Examplesopen allclose all Basic Examples (4)Plot a matrix as an array of colors:
Plot a matrix using only black and white:
Plot the structure of dense matrices:
Plot the structure of sparse matrices:
Scope (19) Data (10)Plot a nonrectangular "matrix", with missing entries transparent:
Negative entries are shown in cool colors, positive entries in warm colors, and zeros in white:
Entries near zero are shown in a shade of gray; entries very close to zero may be shown in white:
Complex numbers are shown based on their real parts:
None is interpreted as a missing value and displayed using transparency:
Symbolic values other than None are shown in dark red:
Colors are shown darker for very sparse matrices to make entries more visible:
Show a matrix with irrational and arbitrary-precision entries:
Presentation (9)Give explicit color directives to specify colors for individual cells:
Use a black-and-white color function to highlight the sparse structure of a matrix:
Use a custom color function with blue colors for negative values and red colors for positive values:
Use ColorRules to color different values:
Use both ColorRules and ColorFunction to color elements, giving priority to ColorRules:
Use Mesh and MeshStyle to provide an overlay mesh:
Options (33) AspectRatio (2) Background (2)Background is normally visible only around the edges:
The background "shows through" whenever an explicit entry is None:
ClippingStyle (3)By default, the clipped values are colored vibrant red and blue:
Use explicit colors for the clipped values:
Use None to indicate no style, showing the background in those cells:
ColorFunction (5)Use an explicit color function:
Use a pure function as the color function:
Use a named color gradient from ColorData:
If the color function is undefined for some value, then a dark red is substituted:
In this case, the color is defined for all the values:
For complex matrices, the real part is used for the color function:
ColorRules (6)Specify color rules for explicit values or patterns:
Implement a "default color" by adding a rule for _:
The array can contain symbolic values:
Use any patterns in ColorRules:
Rules are used in the order given:
ColorRules can be used together with ColorFunction and has higher priority:
DataReversed (1) MaxPlotPoints (1)By default, automatic methods are used to downsample large and/or sparse matrices:
Without downsampling, the entries are less visible:
Explicitly set downsampling values for MaxPlotPoints:
The visual appearance in the resulting plot is also affected by the choice of ColorFunction:
Mesh (3)Insert mesh lines between all cells:
Insert 19 row mesh lines and 1 column mesh line:
Use a sequence of colors for the mesh lines:
PlotRange (3)Plot only elements with values from 0 to 1; clip the rest:
The first two entries in PlotRange specify the range of rows and columns to include:
PlotTheme (2)Use a theme with simple ticks and grid lines in a bright color scheme:
Applications (3)Zoom in to the top-left diagonal block:
Plot the imaginary parts of a discrete Fourier transform matrix:
Plot a table of values of five sine waves in random directions:
Properties & Relations (6)MatrixPlot colors negative entries with cool colors and positive entries with warm colors:
ArrayPlot uses gray scale:
MatrixPlot rescales the matrix entries to differentiate values over a wide range:
Without rescaling, fewer elements can be differentiated:
Use ReliefPlot for medical and geographic data:
Use ListDensityPlot for structured or unstructured data sampled from continuous densities:
Use ArrayPlot3D for 3D arrays of data:
Use GraphPlot for visualizing adjacency matrices:
Possible Issues (2)Using MaxPlotPoints may result in artifacts not actually present in the original data:
With a small MaxPlotPoints option value, all entries become nonzero:
Entries very close to zero may be treated as zero:
Neat Examples (1)Plot the Sin function at integer points:
Wolfram Research (2007), MatrixPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/MatrixPlot.html (updated 2014). TextWolfram Research (2007), MatrixPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/MatrixPlot.html (updated 2014).
CMSWolfram Language. 2007. "MatrixPlot." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/MatrixPlot.html.
APAWolfram Language. (2007). MatrixPlot. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MatrixPlot.html
BibTeX@misc{reference.wolfram_2025_matrixplot, author="Wolfram Research", title="{MatrixPlot}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/MatrixPlot.html}", note=[Accessed: 12-July-2025 ]}
BibLaTeX@online{reference.wolfram_2025_matrixplot, organization={Wolfram Research}, title={MatrixPlot}, year={2014}, url={https://reference.wolfram.com/language/ref/MatrixPlot.html}, note=[Accessed: 12-July-2025 ]}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4