Matplot — 2D plot of a matrix using colors
Matplot(a,[strf,rect,nax]) Matplot(a,<opt_args>)
real matrix of size (n1,n2).
This represents a sequence of statements key1=value1,
key2=value2
,... where key1
,
key2,...
can be one of the following:
sets the bounds of the plot. If this key is given and
neither frameflag
nor strf
is given
then the y
character of strf
is
supposed to be 7
. See below for value.
sets the grids definition. If this key is given and
neither axesflag
nor strf
is given
then the z
character of strf
is
supposed to be 1
. See below for value.
specifies how the frame of the plot is computed. The
value is an integer ranging from 0 to 8. It corresponds to the
y
character of strf
. See below.
specifies what kind of axes are drawn around the plot.
The value is an integer ranging from 0 to 5. It corresponds to
the z
character of strf
. See
below.
is a string of length 3 "xyz"
.
The default is "081"
.
controls the display of captions.
no caption.
captions are displayed. They are given by the
optional argument leg
.
controls the computation of the actual coordinate ranges from the minimal requested values. Actual ranges can be larger than minimal requirements.
no computation, the plot use the previus (or default) scale
from the rect arg
from the min/max of the x, y datas
built for an isometric scale from the rect arg
built for an isometric plot from the min/max of the x, y datas
enlarged for pretty axes from the rect arg
enlarged for pretty axes from the min/max of the x, y datas
like y=1 but the previus plot(s) are redrawn to use the new scale
like y=2 but the previus plot(s) are redrawn to use the new scale
controls the display of information on the frame around
the plot. If axes are requested, the number of tics can be
specified by the nax
optional argument.
nothing is drawn around the plot.
axes are drawn, the y=axis is displayed on the left.
the plot is surrounded by a box without tics.
axes are drawn, the y=axis is displayed on the right.
axes are drawn centred in the middle of the frame box, with the box disabled.
axes are drawn centred in the middle of the frame box, with the box enabled.
This argument is used when the second character y of argument
strf
is 1, 3 or 5. It is a row vector of size 4 and
gives the dimension of the frame:
rect=[xmin,ymin,xmax,ymax]
.
This argument is used when the third character z of argument
strf
is 1. It is a row vector with four entries
[nx,Nx,ny,Ny]
where nx
(ny
)
is the number of subgraduations on the x (y) axis and
Nx
(Ny
) is the number of graduations on
the x (y) axis.
The entries of matrix int(a)
are used as colormap entries
in the current colormap.
The color associated to a(i,j)
is
used do draw a small square of size 1 with center at location
(x=j,y=(n1-i+1))
.
If a matrix entry is outside the colormap, the corresponding rectangle is not displayed.
Enter the command Matplot()
to see a demo.