1 <?xml version="1.0" encoding="UTF-8"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) ENPC - Jean-Philippe Chancelier
6 * This file must be used under the terms of the CeCILL.
7 * This source file is licensed as described in the file COPYING, which
8 * you should have received as part of this distribution. The terms
9 * are also available at
10 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
13 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="Matplot1">
15 <refname>Matplot1</refname>
17 2D plot of a matrix using colors
21 <title>Calling Sequence</title>
22 <synopsis>Matplot1(a, rect)</synopsis>
25 <title>Arguments</title>
31 a real matrix of size <literal>(n1,n2)</literal>.
39 <literal>[xmin, ymin, xmax, ymax]</literal>.
46 <title>Description</title>
48 The entries of matrix <code>int(a)</code> are used as colormap entries
49 in the current colormap. <varname>rect</varname> specifies a rectangle in the
50 current scale and the matrix is drawn inside this rectangle. Each matrix
51 entry will be rendered as a small rectangle filled with its associated
52 color. If a matrix entry is outside the colormap, the corresponding rectangle
56 Enter the command <code>Matplot1()</code> to see a demo.
60 <title>Examples</title>
61 <programlisting role="example"><![CDATA[
63 ax = gca();//get current axes handle
64 ax.data_bounds = [0, 0; 10, 10]; //set the data_bounds
65 ax.box = 'on'; //draw a box
69 // first matrix in rectangle [1,1,3,3]
70 Matplot1(a, [1,1,3,3])
73 // second matrix in rectangle [5,6,7,8]
77 ax=gca();//get current axes handle
78 ax.data_bounds=[0,0;10,10];//set the data_bounds
79 ax.box='on'; //draw a box
80 a=5*ones(11,11); a(2:10,2:10)=4; a(5:7,5:7)=2;
81 // first matrix in rectangle [1,1,3,3]
83 a=ones(10,10); a= 3*tril(a)+ 2*a;
84 // second matrix in rectangle [5,6,7,8]
87 <programlisting role="example"><![CDATA[
92 f=gcf();//get current figure handle
93 f.pixmap='on';//double buffer modea
94 ax=gca();//get current axes handle
95 ax.data_bounds=[0,0;10,10];//set the data_bounds
96 ax.box='on'; //draw a box
102 if k>-n then delete(gce()),end
103 Matplot1(a,[k1,2,k1+7,9])
104 sleep(8); // Slow down the simulation
109 <refsection role="see also">
110 <title>See Also</title>
111 <simplelist type="inline">
113 <link linkend="colormap">colormap</link>
116 <link linkend="plot2d">plot2d</link>
119 <link linkend="Matplot">Matplot</link>
122 <link linkend="grayplot">grayplot</link>
125 <link linkend="Matplot_properties">Matplot_properties</link>