Scilab 5.3.3
- Aide Scilab
- Graphiques
- 2d_plot
- contour2di
- contourf
- errbar
- fec
- fgrayplot
- histplot
- paramfplot2d
- LineSpec
- Matplot
- Matplot1
- Matplot_properties
- Sfgrayplot
- Sgrayplot
- champ
- champ1
- champ_properties
- comet
- contour2d
- fchamp
- fcontour2d
- fec_properties
- fplot2d
- grayplot
- grayplot_properties
- graypolarplot
- oldplot
- plot
- plot2d
- plot2d1
- plot2d2
- plot2d3
- plot2d4
- plot2d_old_version
- polarplot
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
Matplot1
2D plot of a matrix using colors
Calling Sequence
Matplot1(a,rect)
Arguments
- a
real matrix of size (n1,n2).
- rect
[xmin,ymin,xmax,ymax]
Description
The entries of matrix int(a)
are used as colormap entries
in the current colormap. rect
specify a rectangle in the
current scale and the matrix is drawn inside this rectangle. Each matrix
entry will be rendered as a small rectangle filled with its associated
color. If a matrix entry is outside the colormap, the corresponding rectangle is not displayed.
Examples
//--- first example clf(); ax=gca();//get current axes handle ax.data_bounds=[0,0;10,10];//set the data_bounds ax.box='on'; //draw a box a=5*ones(11,11); a(2:10,2:10)=4; a(5:7,5:7)=2; // first matrix in rectangle [1,1,3,3] Matplot1(a,[1,1,3,3]) a=ones(10,10); a= 3*tril(a)+ 2*a; // second matrix in rectangle [5,6,7,8] Matplot1(a,[5,6,7,8]) //--- second example (animation) n=100; clf(); f=gcf();//get current figure handle f.pixmap='on';//double buffer mode ax=gca();//get current axes handle ax.data_bounds=[0,0;10,10];//set the data_bounds ax.box='on'; //draw a box show_pixmap() for k=-n:n, a=ones(n,n); a= 3*tril(a,k)+ 2*a; a= a + a'; k1= 3*(k+100)/200; if k>-n then delete(gce()),end Matplot1(a,[k1,2,k1+7,9]) show_pixmap() //send double buffer to screen end f.pixmap='off';
See Also
- colormap — using colormaps
- plot2d — 2D plot
- Matplot — 2D plot of a matrix using colors
- grayplot — 2D plot of a surface using colors
- Matplot_properties — description of the Matplot entities properties
Authors
J.Ph.C.
<< Matplot | 2d_plot | Matplot_properties >> |