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 * Copyright (C) 2012 - 2016 - Scilab Enterprises
8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
10 * This file was originally licensed under the terms of the CeCILL v2.1,
11 * and continues to be available under such terms.
12 * For more information, see the COPYING file which you should have received
13 * along with this program.
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="contourf" xml:lang="en">
18 <refname>contourf</refname>
19 <refpurpose>Curvas de nível preenchidas de uma superfície em um esboço
24 <title>Seqüência de Chamamento</title>
25 <synopsis>contourf(x,y,z,nz,[style,strf,leg,rect,nax])</synopsis>
27 <refsection role="parameters">
28 <title>Parâmetrtos</title>
33 <para>dois vetores de reais de tamanhos n1 e n2 definindo o grid.
40 <para>matriz de reais de tamanho (n1,n2), os valores da função.
47 <para>os valores de nível ou o número de níveis.</para>
53 Se <literal>nz</literal> for um inteiro, seu valor
54 fornece o número de níveis igualmente espaçados de zmin a zmax
57 <programlisting role=""><![CDATA[
58 z= zmin + (1:nz)*(zmax-zmin)/(nz+1)
61 Note que os níveis <literal>zmin</literal> e
62 <literal>zmax</literal> não são desenhados (genericamente eles
63 são reduzidos a pontos) mas podem ser adicionados através de
65 <programlisting role=""><![CDATA[
66 [im,jm] = find(z == zmin); // ou zmax
67 plot2d(x(im)',y(jm)',-9,"000")
75 Se <literal>nz</literal> for um vetor,
76 <literal>nz(i)</literal> fornece o valor da i-ésima curva de
85 <term>style,strf,leg,rect,nax</term>
88 ver <literal>plot2d</literal>. O argumento
89 <literal>style</literal> fornece as cores a serem utilizadas pelas
90 curvas de nível. Deve ter o mesmo tamanho que o número de
97 <refsection role="description">
98 <title>Descrição</title>
100 <literal>contourf</literal> pinta a superfície entre duas curvas de
101 nível consecutivas <literal>z=f(x,y)</literal> em um esboço 2d. Os valores
102 de <literal>f(x,y)</literal> são fornecidos pela matriz
103 <literal>z</literal> nos pontos de grid definidos por <literal>x</literal>
104 e <literal>y</literal>.
106 <para>Você pode mudar o formato dos pontos flutuantes impressos sobre os
107 níveis utilizando <literal>xset("fpf",string)</literal> onde
108 <literal>string</literal> fornece o formato em sintaxe de formato C ( por
109 exemplo <literal>string="%.3f"</literal>). Use
110 <literal>string=""</literal> para voltar ao formato padrão.
113 Entre com o comando <literal>contourf()</literal> para visualizar
117 <refsection role="examples">
118 <title>Exemplos</title>
119 <programlisting role="example"><![CDATA[
120 contourf(1:10,1:10,rand(10,10),5,1:5,"011"," ",[0,0,11,11])
122 function z=peaks(x,y)
123 x1=x(:).*.ones(1,size(y,'*'));
124 y1=y(:)'.*.ones(size(x,'*'),1);
125 z = (3*(1-x1).^2).*exp(-(x1.^2) - (y1+1).^2) ...
126 - 10*(x1/5 - x1.^3 - y1.^5).*exp(-x1.^2-y1.^2) ...
127 - 1/3*exp(-(x1+1).^2 - y1.^2)
131 x=-4:0.1:4;y=x;z=peaks(x,y);
136 levels=[-6:-1,-logspace(-5,0,10),logspace(-5,0,10),1:8];
139 r = [(1:n)'/n; ones(m-n,1)];
140 g = [zeros(n,1); (1:n)'/n; ones(m-2*n,1)];
141 b = [zeros(2*n,1); (1:m-2*n)'/(m-2*n)];
146 contourf([],[],z,[-6:-1,-logspace(-5,0,10),logspace(-5,0,10),1:8],0*ones(1,m))
150 contourf([],[],z,[-6:-1,-logspace(-5,0,10),logspace(-5,0,10),1:8]);
153 <refsection role="see also">
154 <title>Ver Também</title>
155 <simplelist type="inline">
157 <link linkend="contour">contour</link>
160 <link linkend="fcontour">fcontour</link>
163 <link linkend="contour2di">contour2di</link>
166 <link linkend="plot2d">plot2d</link>
169 <link linkend="xset">xset</link>