aaf689c272e4325fdc530847f923d2612ec8b47a
[scilab.git] / scilab / modules / graphics / help / pt_BR / axes_operations / newaxes.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) INRIA - Serge Steer
5  *
6  * Copyright (C) 2012 - 2016 - Scilab Enterprises
7  *
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.
14  *
15  -->
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
17           xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml"
18           xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
19           xmlns:scilab="http://www.scilab.org" xml:id="newaxes" xml:lang="pt">
20     <refnamediv>
21         <refname>newaxes</refname>
22         <refpurpose>Cria uma nova entidade Axes (de eixos)</refpurpose>
23     </refnamediv>
24     <refsynopsisdiv>
25         <title>Seqüência de Chamamento</title>
26         <synopsis>
27             a = newaxes()
28             a = newaxes(h)
29         </synopsis>
30     </refsynopsisdiv>
31     <refsection>
32         <title>Parâmetros</title>
33         <variablelist>
34             <varlistentry>
35                 <term>h</term>
36                 <listitem>
37                   <para>
38                     Optional handle of the graphic parent of the new axes,
39                     of type <literal>Figure</literal> or
40                     <literal>Uicontrol</literal> of style <literal>Frame</literal>.
41                     By default, the current figure is used.
42                   </para>
43                 </listitem>
44             </varlistentry>
45             <varlistentry>
46                 <term>a</term>
47                 <listitem>
48                     <para>o manipulador para a nova entidade Axes criada</para>
49                 </listitem>
50             </varlistentry>
51         </variablelist>
52     </refsection>
53     <refsection>
54         <title>Descrição</title>
55         <para>
56             <literal>newaxes()</literal> é usado para criar uma nova entidade
57             <literal>Axes</literal> (ver <link linkend="graphics_entities">graphics_entities</link>) na figura corrente.
58             As propriedades dessa entidade são herdadas da entidade
59             <literal>default_axes</literal> (ver <link linkend="gda">gda</link>)
60         </para>
61     </refsection>
62     <refsection>
63         <title>Exemplos</title>
64         <programlisting role="example"><![CDATA[
65 clf()
66 a1 = newaxes();
67 a1.axes_bounds = [0,0,1.0,0.5];
68 t = 0:0.1:20;
69 plot(t,acosh(t),'r')
70 a2 = newaxes();
71 a2.axes_bounds = [0,0.5,1.0,0.5];
72 x = 0:0.1:4;
73 plot(x,sinh(x))
74 legend('sinh')
75
76 sca(a1); //tornando os primeiros eixos os eixos correntes
77 plot(t,asinh(t),'g')
78 legend(['acosh','asinh'])
79  ]]></programlisting>
80         <para>
81             The following example uses <literal>newaxes(h)</literal>
82         </para>
83         <programlisting role="example"><![CDATA[
84 // Create a new figure
85 f = figure("layout", "gridbag", ...
86     "toolbar", "none", ...
87     "menubar", "none", ...
88     "backgroundcolor", [1 1 1]);
89
90 // Create the frames where each graph is put
91 c = createConstraints("gridbag", [1 1 1 1], [1 1], "both");
92 top_left = uicontrol(f, "style", "frame","constraints", c);
93
94 c.grid = [2 1 1 1];
95 top_right = uicontrol(f, "style", "frame", "constraints", c);
96
97 c.grid = [1 2 2 2];
98 bottom = uicontrol(f, "style", "frame", "constraints", c);
99
100 // Create the axes in each frame
101 a_tl = newaxes(top_left);
102 a_tr = newaxes(top_right);
103 a_bt = newaxes(bottom);
104
105 // Plot in the frames
106 X = (1:100) ./ 50;
107 plot(a_tl, X, X, "r");
108 plot(a_tr, X, cos(2 * %pi * 3 * X), "g");
109 plot(a_bt, X, exp(X), "b");
110
111 title(a_tl, "a line");
112 title(a_tr, "a cosine");
113 title(a_bt, "the exponential");
114     ]]></programlisting>
115     </refsection>
116     <refsection role="see also">
117         <title>Ver Também</title>
118         <simplelist type="inline">
119             <member>
120                 <link linkend="subplot">subplot</link>
121             </member>
122             <member>
123                 <link linkend="xsetech">xsetech</link>
124             </member>
125             <member>
126                 <link linkend="gda">gda</link>
127             </member>
128             <member>
129                 <link linkend="sca">sca</link>
130             </member>
131         </simplelist>
132     </refsection>
133     <refsection role="history">
134         <title>Histórico</title>
135         <revhistory>
136             <revision>
137                 <revnumber>5.5.0</revnumber>
138                 <revdescription>newaxes(h) can target a uicontrol frame or a given figure.
139                 </revdescription>
140             </revision>
141         </revhistory>
142     </refsection>
143 </refentry>