a7c4fd96ae6d2a5457a64b448747eb7ac3e738de
[scilab.git] / scilab / modules / graphics / help / en_US / axes_operations / replot.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) ENPC - Jean-Philippe Chancelier
5  * 
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
11  *
12  -->
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="replot">
14     <refnamediv>
15         <refname>replot</refname>
16         <refpurpose>redraw the current graphics window with new
17             boundaries
18         </refpurpose>
19     </refnamediv>
20     <refsynopsisdiv>
21         <title>Calling Sequence</title>
22         <synopsis>replot(rect,[handle])</synopsis>
23     </refsynopsisdiv>
24     <refsection>
25         <title>Arguments</title>
26         <variablelist>
27             <varlistentry>
28                 <term>rect</term>
29                 <listitem>
30                     <para>row vector of size 4.</para>
31                 </listitem>
32             </varlistentry>
33             <varlistentry>
34                 <term>handle</term>
35                 <listitem>
36                     <para>optional argument. Graphics handle(s) of type Axes to select
37                         one or several given Axes.
38                     </para>
39                 </listitem>
40             </varlistentry>
41         </variablelist>
42     </refsection>
43     <refsection>
44         <title>Description</title>
45         <para>
46             <literal>replot</literal> is used to redraw the content of the current
47             graphics window with new boundaries defined by
48             <literal>rect=[xmin,ymin,xmax,ymax]</literal>. Under old graphics syntax, it
49             works only with the driver <literal>"Rec"</literal>.
50         </para>
51         <para>This transformation can be applied to specific
52             axes given by Axes graphics handles via the handle argument. If handle is
53             not specified, the new boundaries are applied to the current axes of the
54             current figure. The transformation changes the <literal>data_bounds</literal>
55             value of those axes. Note that the axes property <literal>tight_limits</literal>
56             must also be set to "on" to strictly select those bounds (see
57             <link linkend="axes_properties">axes_properties</link>).<literal> </literal>
58         </para>
59     </refsection>
60     <refsection>
61         <title>Examples</title>
62         <programlisting role="example"><![CDATA[
63       backupstyle='?'
64
65       x=[0:0.1:2*%pi]';
66       plot2d(x,sin(x))
67       replot([-1,-1,10,2])
68       ]]></programlisting>
69         <scilab:image>
70             backupstyle='?'
71             
72             x=[0:0.1:2*%pi]';
73             plot2d(x,sin(x))
74             replot([-1,-1,10,2])
75         </scilab:image>
76         
77         <programlisting role="example"><![CDATA[
78       backupstyle='?'
79       xdel(winsid());
80       plot() // plot demo
81       f=gcf();
82       replot([-1,-1,10,2],f.children(1)) // specify axes handle's value
83       replot([-3,-2,8,4],f.children(2))
84       ]]></programlisting>
85         <scilab:image>
86             xdel(winsid());
87             plot()
88             f2=gcf();
89             replot([-1,-1,10,2],f2.children(1))
90             replot([-3,-2,8,4],f2.children(2))
91         </scilab:image>
92         
93     </refsection>
94     <refsection role="see also">
95         <title>See Also</title>
96         <simplelist type="inline">
97             <member>
98                 <link linkend="clf">clf</link>
99             </member>
100         </simplelist>
101     </refsection>
102 </refentry>