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
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
* Ajouter ici d'ventuels commentaires sur le fichier XML
-->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="pcolor" xml:lang="en">
<info>
<pubdate>$LastChangedDate: 26-05-2009 $</pubdate>
</info>
<refnamediv>
<refname>pcolor</refname>
<refpurpose>Pseudo color 2-D plot</refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Calling Sequence</title>
<synopsis>hdl = pcolor(X,Y,C)</synopsis>
</refsynopsisdiv>
<refsection>
<title>Parameter</title>
<variablelist>
<varlistentry>
<term>X</term>
<listitem>
<para>1 by n matrix or n by n matrix</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Y</term>
<listitem>
<para>1 by n matrix or n by n matrix</para>
</listitem>
</varlistentry>
<varlistentry>
<term>C</term>
<listitem>
<para>n by n matrix</para>
</listitem>
</varlistentry>
<varlistentry>
<term>hdl</term>
<listitem>
<para>Handle of the created Fac3d entity</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection>
<title>Description</title>
<para>pcolor(x,y,C) plots the colored rectangular or non rectangular 2D
patches defined by three arguments</para>
<para>The axis labels are determined by the range of X, Y or by a 'axis'
property setting. The color of the patch is determined by the matrix C.
The entries of C are scaled to correspond to the current colormap entries
(see caxis and colormap).</para>
<para>When x,y and C are matrices of the same size, pcolor(x,y,C) plots
the colored patches of vertices (x(i,j), y(i,j)) and color C(i,j).</para>
<para>When x,y are vector arguments you must have length(x) = n and
length(y) = m where [m,n] = size(C).In this case, the vertices of the
(rectangular) patches are the couples (x(j), y(i)). Note that x
corresponds to the columns of C and y corresponds to the rows. Example
:</para>
<programlisting>r=linspace(0,1,25);
theta=%pi/4+linspace(0,3*%pi/2,25);
[R,T]=meshgrid(r,theta);
pcolor(R.*cos(T),R.*sin(T),exp(-2*R.^2));
shading interp
colorbar on
axis equal</programlisting>
<para>Note that surf(Z) uses x = 1:n and y = 1:m. When f is a
function/macro and x,y are vectors, pcolor(x,y,f) produces a 2D plot
corresponding to a parametric or non parametric surface defined by f
:</para>
<itemizedlist>
<listitem>
<para>if Z has the syntax z=f(x,y) then pcolor(x,y,f) plots a 2D view
of a non parametric surface,</para>
</listitem>
<listitem>
<para>if Z has the syntax [x,y,z]=f(u,v), then pcolor(u,v,f) plots a
2D view of a parametric surface,</para>
</listitem>
<listitem>
<para>pcolor(x,y,f,g), when g has the syntax g=f(x,y), uses the color
given by g to determine the color of faces.</para>
</listitem>
</itemizedlist>
</refsection>
<refsection>
<title>Examples</title>
<programlisting role="example">[R,T]=meshgrid(linspace(0,1,25),%pi/4+linspace(0,3*%pi/2,25));
drawlater
pcolor(R.*cos(T),R.*sin(T),rand(T));
shading interp
colorbar on
axis equal
drawnow</programlisting>
</refsection>
<refsection>
<title>Screenshot</title>
<screenshot>
<mediaobject>
<imageobject>
<imagedata fileref="pcolor.png"/>
</imageobject>
</mediaobject>
</screenshot>
</refsection>
<refsection>
<title>See Also</title>
<simplelist type="inline">
<member>
<link linkend="plot">plot</link>
</member>
<member>
<link linkend="plot3">plot3</link>
</member>
<member>
<link linkend="tripcolor">tripcolor</link>
</member>
<member>
<link linkend="colormap">colormap</link>
</member>
<member>
<link linkend="shading">shading</link>
</member>
<member>
<link linkend="caxis">caxis</link>
</member>
</simplelist>
</refsection>
<refsection>
<title>Authors</title>
<simplelist type="vert">
<member>Stphane Mottelet</member>
</simplelist>
</refsection>
</refentry>
|