plot a Matrix - Maple Help

plots

 matrixplot
 3-D plot with z values determined by a matrix

 Calling Sequence matrixplot(A, options)

Parameters

 A - Matrix options -

Description

 • The matrixplot function defines a three-dimensional graph where the x and y coordinates represent the row and column indices of A, respectively. The z values are the corresponding entries of A.
 • The remaining arguments are options specified as equations of the form option = value.  For example:
 heights=histogram
 The plot is drawn in the form of a three-dimensional histogram.
 gap=r
 The value of r is a real number between 0 and 1.
 color=F
 The color of the plot is given by F,  where F is a color specification as described in the plot/color help page. F can also be a two-argument procedure returning a single real value to be interpreted as a hue rather than RGB value.
 Other options include most of those found with plot3d. These include axes, view, title, labels, style, projection, and orientation.  See plot3d/option.
 • The result of a call to matrixplot is a PLOT3D structure which can be rendered by the plotting device. You can assign a PLOT3D value to a variable, save it in a file, then read it back in for redisplay.  See plot3d/structure for more information.

Examples

 > $\mathrm{with}\left(\mathrm{plots}\right):$
 > $\mathrm{with}\left(\mathrm{LinearAlgebra}\right):$
 > $A≔\mathrm{HilbertMatrix}\left(8\right):$$B≔\mathrm{ToeplitzMatrix}\left(\left[1,2,3,4,-4,-3,-2,-1\right],\mathrm{symmetric}\right):$
 > $\mathrm{matrixplot}\left(\mathrm{.}\left(A,B\right)\right)$
 > $\mathrm{matrixplot}\left(A+B,\mathrm{heights}=\mathrm{histogram},\mathrm{axes}=\mathrm{boxed}\right)$
 > $\mathrm{matrixplot}\left(A+B,\mathrm{heights}=\mathrm{histogram},\mathrm{axes}=\mathrm{frame},\mathrm{gap}=0.25\right)$
 > $F≔\left(x,y\right)→\mathrm{sin}\left(xy\right):$
 > $\mathrm{matrixplot}\left(A+B,\mathrm{heights}=\mathrm{histogram},\mathrm{axes}=\mathrm{frame},\mathrm{gap}=0.25,\mathrm{color}=F\right)$
 > $L≔\mathrm{HilbertMatrix}\left(4,5\right)$
 ${L}{≔}\left[\begin{array}{ccccc}{1}& \frac{{1}}{{2}}& \frac{{1}}{{3}}& \frac{{1}}{{4}}& \frac{{1}}{{5}}\\ \frac{{1}}{{2}}& \frac{{1}}{{3}}& \frac{{1}}{{4}}& \frac{{1}}{{5}}& \frac{{1}}{{6}}\\ \frac{{1}}{{3}}& \frac{{1}}{{4}}& \frac{{1}}{{5}}& \frac{{1}}{{6}}& \frac{{1}}{{7}}\\ \frac{{1}}{{4}}& \frac{{1}}{{5}}& \frac{{1}}{{6}}& \frac{{1}}{{7}}& \frac{{1}}{{8}}\end{array}\right]$ (1)
 > $\mathrm{matrixplot}\left(L\right)$
 > $Y≔\mathrm{Matrix}\left(20,3,\left(i,j\right)→\mathrm{evalf}\left(1+\mathrm{sin}\left(\frac{ij}{\mathrm{Pi}}\right)\right),\mathrm{datatype}={\mathrm{float}}_{8}\right):$
 > $\mathrm{plots}:-\mathrm{matrixplot}\left(Y,\mathrm{heights}=\mathrm{histogram},\mathrm{gap}=0.5,\mathrm{color}=\left(\left(x,y\right)→1-\frac{y}{3}+0.2\right),\mathrm{orientation}=\left[-55,55,0\right],\mathrm{labels}=\left["","",""\right]\right)$

The command to create the plot from the Plotting Guide is

 > $\mathrm{matrixplot}\left(A\right)$