* Add examples in graphics 49/9649/4
Sylvestre Ledru [Sat, 10 Nov 2012 19:34:14 +0000 (20:34 +0100)]
* Help pages without examples

Change-Id: Iae7322c3d26349012b3fd928e97a13fd2fa71f42

17 files changed:
scilab/modules/dynamic_link/help/en_US/ulink.xml
scilab/modules/fileio/help/en_US/fscanf.xml
scilab/modules/functions/help/en_US/sciargs.xml
scilab/modules/graphics/help/en_US/2d_plot/fcontour2d.xml
scilab/modules/graphics/help/en_US/3d_plot/fac3d.xml
scilab/modules/graphics/help/en_US/3d_plot/fcontour.xml
scilab/modules/graphics/help/en_US/3d_plot/secto3d.xml
scilab/modules/graphics/help/en_US/Graphics.xml
scilab/modules/graphics/help/en_US/color_management/addcolor.xml
scilab/modules/graphics/help/en_US/color_management/color_list.xml
scilab/modules/graphics/help/en_US/color_management/getcolor.xml
scilab/modules/graphics/help/en_US/handle/unglue.xml
scilab/modules/graphics/help/en_US/interaction/locate.xml
scilab/modules/helptools/help/en_US/help.xml
scilab/modules/linear_algebra/help/en_US/eigen/gschur.xml
scilab/modules/linear_algebra/help/en_US/eigen/gspec.xml
scilab/modules/scinotes/help/en_US/editor.xml

index 0bd4cca..2dbf217 100644 (file)
@@ -13,7 +13,7 @@
 <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="ulink">
     <refnamediv>
         <refname>ulink</refname>
-        <refpurpose>unlink a dynamically linked shared object</refpurpose>
+        <refpurpose>unlink/unload a dynamically linked shared object</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Calling Sequence</title>
@@ -56,6 +56,29 @@ scilab -nwni -profile
             allow <literal>valgrind</literal> to perform its sum-up analysis.
         </para>
     </refsection>
+    <refsection>
+        <title>Examples</title>
+        <programlisting role="example"><![CDATA[ 
+cd TMPDIR
+f1=['#include <math.h>'
+    'void fooc(double c[],double a[],double *b,int *m,int *n)'
+    '{'
+    '   int i;'
+    '   for ( i =0 ; i < (*m)*(*n) ; i++) '
+    '     c[i] = sin(a[i]) + *b; '
+    '}'];
+mputl(f1,'fooc.c');
+
+ilib_for_link('fooc','fooc.c',[],"c");
+exec loader.sce;
+
+link() // Will should fooc
+link("show") // Will should the value 0
+
+ulink(0) // ulink fooc
+ ]]></programlisting>
+    </refsection>
+    
     <refsection role="see also">
         <title>See Also</title>
         <simplelist type="inline">
index 15ba585..a57e876 100644 (file)
@@ -11,7 +11,7 @@
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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="fscanf">
+<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" scilab:needs-examples="no" xml:id="fscanf">
     <refnamediv>
         <refname>fscanf</refname>
         <refpurpose>
index 233922d..40a5042 100644 (file)
             This function corresponds to the <literal>getarg</literal> function in C language.
         </para>
     </refsection>
+    <refsection>
+        <title>Examples</title>
+        <programlisting role="example"><![CDATA[
+args=sciargs()
+ ]]></programlisting>
+    </refsection>
+    
     <refsection role="see also">
         <title>See Also</title>
         <simplelist type="inline">
index d4427b9..c30c935 100644 (file)
@@ -10,7 +10,7 @@
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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="fcontour2d">
+<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" scilab:needs-examples="no" xml:id="fcontour2d">
     <refnamediv>
         <refname>fcontour2d</refname>
         <refpurpose>
index d1d007e..4a0179e 100644 (file)
@@ -10,7 +10,7 @@
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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="fac3d">
+<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" scilab:needs-examples="no" xml:id="fac3d">
     <refnamediv>
         <refname>fac3d</refname>
         <refpurpose>
index ec1d378..360e8db 100644 (file)
@@ -10,7 +10,7 @@
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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="fcontour">
+<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" scilab:needs-examples="no" xml:id="fcontour">
     <refnamediv>
         <refname>fcontour</refname>
         <refpurpose>level curves on a 3D surface defined by a
index 0070aa0..5123110 100644 (file)
@@ -17,8 +17,8 @@
     </refnamediv>
     <refsynopsisdiv>
         <title>Calling Sequence</title>
-        <synopsis>[m[,x]]=secto3d(seclist,npas)
-            [m]=secto3d(seclist ,x)
+        <synopsis>[m[,x]]=secto3d(seclist, npas)
+            [m]=secto3d(seclist, x)
         </synopsis>
     </refsynopsisdiv>
     <refsection>
index d05e453..3b00d8f 100644 (file)
@@ -10,7 +10,7 @@
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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="Graphics">
+<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" scilab:needs-examples="no" xml:id="Graphics">
     <refnamediv>
         <refname>Graphics: Getting started</refname>
         <refpurpose>graphics library overview</refpurpose>
index efb12fb..e1e7efb 100644 (file)
@@ -67,7 +67,6 @@ addcolor(name2rgb('grey')/255);
             h.color_map = jetcolormap(16);
             addcolor(name2rgb('grey')/255);
         </scilab:image>
-        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 3c9cfc0..e44dc29 100644 (file)
             </tr>
         </informaltable>
     </refsection>
+    <refsection>
+        <title>Examples</title>
+        <programlisting role="example"><![CDATA[
+plot3d();
+h = gcf();
+h.color_map = jetcolormap(16);
+addcolor(name2rgb('grey')/255);
+addcolor(name2rgb('red'));
+
+rgb2name(240, 255, 255)
+
+ ]]></programlisting>
+    </refsection>
+    
     <refsection role="see also">
         <title>See Also</title>
         <simplelist type="inline">
index bf44764..a1f7036 100644 (file)
             <literal>getcolor</literal> returns the id of the selected color or [] if the "Cancel" button has been clicked or the window closed.
         </para>
     </refsection>
+    <refsection>
+        <title>Examples</title>
+        <programlisting role="example"><![CDATA[
+getcolor();
+
+getcolor("Title foo");
+
+getcolor("foo",21); // Select the red
+ ]]></programlisting>
+    </refsection>
+    
     <refsection role="see also">
         <title>See Also</title>
         <simplelist type="inline">
index 8ad5ea3..a68a260 100644 (file)
             children.
         </para>
     </refsection>
+    
+    <refsection>
+        <title>Examples</title>
+        <programlisting role="example"><![CDATA[ 
+a=gca();
+t=0:9;
+x=cos(t*%pi/5);
+y=sin(t*%pi/5);
+plot(x,y,'r-');
+p = unglue(gce())
+set(p,"closed","on");
+ ]]></programlisting>
+    </refsection>
+    
     <refsection role="see also">
         <title>See Also</title>
         <simplelist type="inline">
index 6903de0..0a2494c 100644 (file)
             If <literal>flag=1</literal> a cross is drawn at the points where the mouse is clicked.
         </para>
     </refsection>
+    plot2d(0,0,0,rect=[0,0,1,1])
+    xgrid(3)
+    X=locate(4)
+    xfpolys(X(1,:)',X(2,:)',4)
     <refsection role="see also">
         <title>See Also</title>
         <simplelist type="inline">
index b11b064..47f8ff7 100644 (file)
             automatically launches a search with the <literal>key</literal> word as search arguments.
         </para>
         <para>
-            See  <link linkend="man">man</link> for more explanation on how to write new help
+            See <link linkend="man">man</link> for more explanation on how to write new help
             pages .
         </para>
     </refsection>
+    <refsection>
+        <title>Examples</title>
+        <programlisting role="example"><![CDATA[
+help();
+help plot3d
+help("plot")
+
+ ]]></programlisting>
+    </refsection>
+    
     <refsection role="see also">
         <title>See Also</title>
         <simplelist type="inline">
index 6253644..71346ed 100644 (file)
@@ -10,7 +10,7 @@
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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="gschur">
+<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" scilab:needs-examples="no" xml:id="gschur">
     <refnamediv>
         <refname>gschur</refname>
         <refpurpose>
index 68db30d..f43e179 100644 (file)
@@ -10,7 +10,7 @@
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<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="gspec">
+<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" scilab:needs-examples="no" xml:id="gspec">
     <refnamediv>
         <refname>gspec</refname>
         <refpurpose>
index ca4ca3c..bbdd918 100644 (file)
     <refsection>
         <title>Description</title>
         <para>
-            An external text editor can be used with Scilab.
+            An external text editor can be used with Scilab. This has to be configured in the <link linkend="preferences">preferences</link> menu.
         </para>
     </refsection>
+    <refsection>
+        <title>Examples</title>
+        <programlisting role="example"><![CDATA[
+// editor without parameters
+editor();
+
+// editor with a file name
+editor('SCI/modules/time/macros/datenum.sci');
+     ]]></programlisting>
+    </refsection>
     <refsection role="see also">
         <title>See Also</title>
         <simplelist type="inline">