1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298
|
<?xml version="1.0" encoding="UTF-8"?>
<!--
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) ENPC - Jean-Philippe Chancelier
*
* This file must be used under the terms of the CeCILL.
* This source file is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at
* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
*
-->
<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" version="5.0-subset Scilab" xml:lang="en" xml:id="Matplot">
<info>
<pubdate>$LastChangedDate$</pubdate>
</info>
<refnamediv>
<refname>Matplot</refname>
<refpurpose>2D plot of a matrix using
colors</refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Calling Sequence</title>
<synopsis>Matplot(a,[strf,rect,nax])
Matplot(a,<opt_args>)</synopsis>
</refsynopsisdiv>
<refsection>
<title>Parameters</title>
<variablelist>
<varlistentry>
<term>a</term>
<listitem>
<para>real matrix of size (n1,n2).</para>
</listitem>
</varlistentry>
<varlistentry>
<term><opt_args></term>
<listitem>
<para>This represents a sequence of statements <literal>key1=value1,
key2=value2</literal>,... where <literal>key1</literal>,
<literal>key2,...</literal> can be one of the following:</para>
<variablelist>
<varlistentry>
<term>rect</term>
<listitem>
<para>sets the bounds of the plot. If this key is given and
neither <literal>frameflag</literal> nor <literal>strf</literal> is given
then the <literal>y</literal> character of <literal>strf</literal> is
supposed to be <literal>7</literal>. See below for value.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>nax</term>
<listitem>
<para>sets the grids definition. If this key is given and
neither <literal>axesflag</literal> nor <literal>strf</literal> is given
then the <literal>z</literal> character of <literal>strf</literal> is
supposed to be <literal>1</literal>. See below for value.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>frameflag</term>
<listitem>
<para>specifies how the frame of the plot is computed. The
value is an integer ranging from 0 to 8. It corresponds to the
<literal>y</literal> character of <literal>strf</literal>. See below.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>axesflag</term>
<listitem>
<para>specifies what kind of axes are drawn around the plot.
The value is an integer ranging from 0 to 5. It corresponds to
the <literal>z</literal> character of <literal>strf</literal>. See
below.</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>strf</term>
<listitem>
<para>is a string of length 3 <literal>"xyz"</literal>.</para>
<variablelist>
<varlistentry>
<term>default</term>
<listitem>
<para>The default is <literal>"081"</literal>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>x</term>
<listitem>
<para>controls the display of captions.</para>
<variablelist>
<varlistentry>
<term>x=0</term>
<listitem>
<para>no caption.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>x=1</term>
<listitem>
<para>captions are displayed. They are given by the
optional argument <literal>leg</literal>.</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>y</term>
<listitem>
<para>controls the computation of the actual coordinate ranges
from the minimal requested values. Actual ranges can be larger
than minimal requirements.</para>
<variablelist>
<varlistentry>
<term>y=0</term>
<listitem>
<para>no computation, the plot use the previus (or
default) scale</para>
</listitem>
</varlistentry>
<varlistentry>
<term>y=1</term>
<listitem>
<para>from the rect arg</para>
</listitem>
</varlistentry>
<varlistentry>
<term>y=2</term>
<listitem>
<para>from the min/max of the x, y datas</para>
</listitem>
</varlistentry>
<varlistentry>
<term>y=3</term>
<listitem>
<para>built for an isometric scale from the rect
arg</para>
</listitem>
</varlistentry>
<varlistentry>
<term>y=4</term>
<listitem>
<para>built for an isometric plot from the min/max of
the x, y datas</para>
</listitem>
</varlistentry>
<varlistentry>
<term>y=5</term>
<listitem>
<para>enlarged for pretty axes from the rect arg</para>
</listitem>
</varlistentry>
<varlistentry>
<term>y=6</term>
<listitem>
<para>enlarged for pretty axes from the min/max of the
x, y datas</para>
</listitem>
</varlistentry>
<varlistentry>
<term>y=7</term>
<listitem>
<para>like y=1 but the previus plot(s) are redrawn to
use the new scale</para>
</listitem>
</varlistentry>
<varlistentry>
<term>y=8</term>
<listitem>
<para>like y=2 but the previus plot(s) are redrawn to
use the new scale</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>z</term>
<listitem>
<para>controls the display of information on the frame around
the plot. If axes are requested, the number of tics can be
specified by the <literal>nax</literal> optional argument.</para>
<variablelist>
<varlistentry>
<term>z=0</term>
<listitem>
<para>nothing is drawn around the plot.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>z=1</term>
<listitem>
<para>axes are drawn, the y=axis is displayed on the
left.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>z=2</term>
<listitem>
<para>the plot is surrounded by a box without tics.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>z=3</term>
<listitem>
<para>axes are drawn, the y=axis is displayed on the
right.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>z=4</term>
<listitem>
<para>axes are drawn centred in the middle of the frame box,
with the box disabled.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>z=5</term>
<listitem>
<para>axes are drawn centred in the middle of the frame box,
with the box enabled.</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>rect</term>
<listitem>
<para>This argument is used when the second character y of argument
<literal>strf</literal> is 1, 3 or 5. It is a row vector of size 4 and
gives the dimension of the frame:
<literal>rect=[xmin,ymin,xmax,ymax]</literal>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>nax</term>
<listitem>
<para>This argument is used when the third character z of argument
<literal>strf</literal> is 1. It is a row vector with four entries
<literal>[nx,Nx,ny,Ny]</literal> where <literal>nx</literal> (<literal>ny</literal>)
is the number of subgraduations on the x (y) axis and
<literal>Nx</literal> (<literal>Ny</literal>) is the number of graduations on
the x (y) axis.</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection>
<title>Description</title>
<para>The entries of matrix <literal>int(a)</literal> are used as colormap entries
in the current colormap.
The color associated to <literal>a(i,j)</literal> is
used do draw a small square of size 1 with center at location
<literal>(x=j,y=(n1-i+1))</literal>.
If a matrix entry is outside the colormap, the corresponding rectangle is not displayed.</para>
<para>Enter the command <literal>Matplot()</literal> to see a demo.</para>
</refsection>
<refsection>
<title>Examples</title>
<programlisting role="example"><![CDATA[
Matplot([1 2 3;4 5 6])
clf()
// draw the current colormap
Matplot((1:xget("lastpattern")))
]]></programlisting>
</refsection>
<refsection>
<title>See Also</title>
<simplelist type="inline">
<member>
<link linkend="colormap">colormap</link>
</member>
<member>
<link linkend="plot2d">plot2d</link>
</member>
<member>
<link linkend="Matplot1">Matplot1</link>
</member>
<member>
<link linkend="Matplot_properties">Matplot_properties</link>
</member>
</simplelist>
</refsection>
<refsection>
<title>Authors</title>
<para>J.Ph.C.</para>
</refsection>
</refentry>
|