947ed1f1ef145cfa6283e71b38e56ad207387470
[scilab.git] / scilab / modules / graphics / help / en_US / 2d_plot / errbar.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="errbar">
14     <refnamediv>
15         <refname>errbar</refname>
16         <refpurpose>Add vertical error bars on a 2D plot</refpurpose>
17     </refnamediv>
18     <refsynopsisdiv>
19         <title>Calling Sequence</title>
20         <synopsis>errbar(x,y,em,ep)</synopsis>
21     </refsynopsisdiv>
22     <refsection>
23         <title>Arguments</title>
24         <variablelist>
25             <varlistentry>
26                 <term>x,y,em,ep</term>
27                 <listitem>
28                     <para>four matrices of the same size.</para>
29                 </listitem>
30             </varlistentry>
31         </variablelist>
32     </refsection>
33     <refsection>
34         <title>Description</title>
35         <para>
36             <literal>errbar</literal> adds vertical error bars on a 2D plot. 
37             <literal>x</literal> and <literal>y</literal> have the same meaning as in <literal>plot2d</literal>.
38             <literal>em(i,j)</literal> and <literal>ep(i,j)</literal> stands for the error interval on the 
39             value <literal>y(i,j)</literal>: <literal>[y(i,j)-em(i,j),y(i,j)+ep(i,j)]</literal>.
40         </para>
41         <para>
42             Enter the command <literal>errbar()</literal> to see a demo.
43         </para>
44     </refsection>
45     <refsection>
46         <title>Examples</title>
47         <programlisting role="example"><![CDATA[ 
48 t=[0:0.1:2*%pi]';
49 y=[sin(t) cos(t)]; x=[t t];
50 plot2d(x,y)
51 errbar(x,y,0.05*ones(x),0.03*ones(x))
52  ]]></programlisting>
53         <scilab:image>
54             t=[0:0.1:2*%pi]';
55             y=[sin(t) cos(t)]; x=[t t];
56             plot2d(x,y)
57             errbar(x,y,0.05*ones(x),0.03*ones(x))
58         </scilab:image>
59     </refsection>
60     <refsection role="see also">
61         <title>See Also</title>
62         <simplelist type="inline">
63             <member>
64                 <link linkend="plot2d">plot2d</link>
65             </member>
66         </simplelist>
67     </refsection>
68 </refentry>