* Add more examples 94/9094/4
Sylvestre Ledru [Fri, 21 Sep 2012 09:10:49 +0000 (11:10 +0200)]
* Split some examples into several
* Move some images right after the code examples

Change-Id: Ie89a45bfabed656397e15252678dc978cf2e8e1d

101 files changed:
scilab/modules/graphics/help/en_US/2d_plot/LineSpec.xml
scilab/modules/graphics/help/en_US/2d_plot/Matplot.xml
scilab/modules/graphics/help/en_US/2d_plot/Matplot1.xml
scilab/modules/graphics/help/en_US/2d_plot/Sfgrayplot.xml
scilab/modules/graphics/help/en_US/2d_plot/Sgrayplot.xml
scilab/modules/graphics/help/en_US/2d_plot/champ.xml
scilab/modules/graphics/help/en_US/2d_plot/champ1.xml
scilab/modules/graphics/help/en_US/2d_plot/contour2d.xml
scilab/modules/graphics/help/en_US/2d_plot/contourf.xml
scilab/modules/graphics/help/en_US/2d_plot/errbar.xml
scilab/modules/graphics/help/en_US/2d_plot/fchamp.xml
scilab/modules/graphics/help/en_US/2d_plot/fec.xml
scilab/modules/graphics/help/en_US/2d_plot/fgrayplot.xml
scilab/modules/graphics/help/en_US/2d_plot/fplot2d.xml
scilab/modules/graphics/help/en_US/2d_plot/grayplot.xml
scilab/modules/graphics/help/en_US/2d_plot/graypolarplot.xml
scilab/modules/graphics/help/en_US/2d_plot/histplot.xml
scilab/modules/graphics/help/en_US/2d_plot/plot.xml
scilab/modules/graphics/help/en_US/2d_plot/plot2d.xml
scilab/modules/graphics/help/en_US/2d_plot/plot2d1.xml
scilab/modules/graphics/help/en_US/2d_plot/plot2d2.xml
scilab/modules/graphics/help/en_US/2d_plot/plot2d3.xml
scilab/modules/graphics/help/en_US/2d_plot/plot2d4.xml
scilab/modules/graphics/help/en_US/2d_plot/polarplot.xml
scilab/modules/graphics/help/en_US/3d_plot/contour.xml
scilab/modules/graphics/help/en_US/3d_plot/eval3d.xml
scilab/modules/graphics/help/en_US/3d_plot/eval3dp.xml
scilab/modules/graphics/help/en_US/3d_plot/fplot3d.xml
scilab/modules/graphics/help/en_US/3d_plot/fplot3d1.xml
scilab/modules/graphics/help/en_US/3d_plot/genfac3d.xml
scilab/modules/graphics/help/en_US/3d_plot/geom3d.xml
scilab/modules/graphics/help/en_US/3d_plot/hist3d.xml
scilab/modules/graphics/help/en_US/3d_plot/mesh.xml
scilab/modules/graphics/help/en_US/3d_plot/milk_drop.xml
scilab/modules/graphics/help/en_US/3d_plot/param3d.xml
scilab/modules/graphics/help/en_US/3d_plot/param3d1.xml
scilab/modules/graphics/help/en_US/3d_plot/plot3d.xml
scilab/modules/graphics/help/en_US/3d_plot/plot3d2.xml
scilab/modules/graphics/help/en_US/3d_plot/plot3d3.xml
scilab/modules/graphics/help/en_US/3d_plot/surf.xml
scilab/modules/graphics/help/en_US/annotation/captions.xml
scilab/modules/graphics/help/en_US/annotation/legend.xml
scilab/modules/graphics/help/en_US/annotation/legends.xml
scilab/modules/graphics/help/en_US/annotation/title.xml
scilab/modules/graphics/help/en_US/annotation/xlabel.xml
scilab/modules/graphics/help/en_US/annotation/xtitle.xml
scilab/modules/graphics/help/en_US/axes_operations/sca.xml
scilab/modules/graphics/help/en_US/axes_operations/subplot.xml
scilab/modules/graphics/help/en_US/axis/drawaxis.xml
scilab/modules/graphics/help/en_US/bar_histogram/bar.xml
scilab/modules/graphics/help/en_US/bar_histogram/barh.xml
scilab/modules/graphics/help/en_US/bar_histogram/barhomogenize.xml
scilab/modules/graphics/help/en_US/color_management/addcolor.xml
scilab/modules/graphics/help/en_US/color_management/autumncolormap.xml
scilab/modules/graphics/help/en_US/color_management/bonecolormap.xml
scilab/modules/graphics/help/en_US/color_management/color.xml
scilab/modules/graphics/help/en_US/color_management/colorbar.xml
scilab/modules/graphics/help/en_US/color_management/colormap.xml
scilab/modules/graphics/help/en_US/color_management/coolcolormap.xml
scilab/modules/graphics/help/en_US/color_management/coppercolormap.xml
scilab/modules/graphics/help/en_US/color_management/graycolormap.xml
scilab/modules/graphics/help/en_US/color_management/hotcolormap.xml
scilab/modules/graphics/help/en_US/color_management/hsv2rgb.xml
scilab/modules/graphics/help/en_US/color_management/hsvcolormap.xml
scilab/modules/graphics/help/en_US/color_management/jetcolormap.xml
scilab/modules/graphics/help/en_US/color_management/oceancolormap.xml
scilab/modules/graphics/help/en_US/color_management/pinkcolormap.xml
scilab/modules/graphics/help/en_US/color_management/rainbowcolormap.xml
scilab/modules/graphics/help/en_US/color_management/springcolormap.xml
scilab/modules/graphics/help/en_US/color_management/summercolormap.xml
scilab/modules/graphics/help/en_US/color_management/whitecolormap.xml
scilab/modules/graphics/help/en_US/color_management/wintercolormap.xml
scilab/modules/graphics/help/en_US/geometric_shapes/xarc.xml
scilab/modules/graphics/help/en_US/geometric_shapes/xarcs.xml
scilab/modules/graphics/help/en_US/geometric_shapes/xarrows.xml
scilab/modules/graphics/help/en_US/geometric_shapes/xfarc.xml
scilab/modules/graphics/help/en_US/geometric_shapes/xfarcs.xml
scilab/modules/graphics/help/en_US/geometric_shapes/xfrect.xml
scilab/modules/graphics/help/en_US/geometric_shapes/xrect.xml
scilab/modules/graphics/help/en_US/geometric_shapes/xrects.xml
scilab/modules/graphics/help/en_US/pie/pie.xml
scilab/modules/graphics/help/en_US/plzr.xml
scilab/modules/graphics/help/en_US/polygon/polyline_properties.xml
scilab/modules/graphics/help/en_US/polygon/xfpoly.xml
scilab/modules/graphics/help/en_US/polygon/xpoly.xml
scilab/modules/graphics/help/en_US/polygon/xpolys.xml
scilab/modules/graphics/help/en_US/polygon/xrpoly.xml
scilab/modules/graphics/help/en_US/text/getfont.xml
scilab/modules/graphics/help/en_US/text/stringbox.xml
scilab/modules/graphics/help/en_US/text/text_properties.xml
scilab/modules/graphics/help/en_US/text/titlepage.xml
scilab/modules/graphics/help/en_US/text/xstring.xml
scilab/modules/graphics/help/en_US/text/xstringb.xml
scilab/modules/graphics/help/en_US/text/xstringl.xml
scilab/modules/graphics/help/en_US/transform/move.xml
scilab/modules/graphics/help/en_US/transform/rotate.xml
scilab/modules/graphics/help/en_US/xgetech.xml
scilab/modules/graphics/help/en_US/xgrid.xml
scilab/modules/graphics/help/en_US/xnumb.xml
scilab/modules/graphics/help/en_US/xsegs.xml
scilab/modules/graphics/help/en_US/xsetech.xml

index f47c773..c65e19a 100644 (file)
         </variablelist>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>x=1:0.1:10; // Init.
-            plot(x,sin(x),'r.-&gt;')
-            t=0:%pi/20:2*%pi;
-            plot(t,sin(t),'ro-.',t,cos(t),'cya+',t,abs(sin(t)),'--mo')
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 x=1:0.1:10; // Init.
 plot(x,sin(x),'r.->') // plots a dash-dotted line with a right-pointing triangle centered on each points.
+ ]]></programlisting>
+        <scilab:image>
+            x=1:0.1:10;
+            plot(x,sin(x),'r.->')
+        </scilab:image>
+        <programlisting role="example"><![CDATA[
 clf();
-
+x=1:0.1:10;
 // If you specify a marker wihtout a line style, only the marker is drawn
 plot(x,sin(x),'d') // plots a dash-dotted line with a right-pointing triangle centered on each points.
-
+ ]]></programlisting>
+        <scilab:image>
+            x=1:0.1:10;
+            plot(x,sin(x),'d')
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 x=1:10; // Init.
 // combinations' order does not matter
 plot(x,x.*x,'*cya--') 
-
+ ]]></programlisting>
+        <scilab:image>
+            x=1:10;
+            plot(x,x.*x,'*cya--')
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 //multiple plots with different LineSpecs
 clf();
 t=0:%pi/20:2*%pi;
 plot(t,sin(t),'ro-.',t,cos(t),'cya+',t,abs(sin(t)),'--mo')
  ]]></programlisting>
+        <scilab:image>x=1:0.1:10;
+            plot(x,sin(x),'r.-&gt;')
+            t=0:%pi/20:2*%pi;
+            plot(t,sin(t),'ro-.',t,cos(t),'cya+',t,abs(sin(t)),'--mo')
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index c17b288..02d5044 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>Matplot();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 Matplot([1 2 3;4 5 6])
+ ]]></programlisting>
+        <scilab:image>
+            Matplot([1 2 3;4 5 6])
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 clf()
 // draw the current colormap 
 Matplot((1:xget("lastpattern")))
  ]]></programlisting>
+        <scilab:image>
+            Matplot((1:xget("lastpattern")))
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 938c368..aa38896 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>Matplot1();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 clf();
index 6a0a3e1..cc71985 100644 (file)
@@ -96,10 +96,6 @@ _____________
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>Sfgrayplot();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 // example #1: plot 4 surfaces
@@ -130,7 +126,37 @@ subplot(2,2,4)
   xtitle("f(x,y) = x^2+y^2")
 drawnow() ;
 show_window()
-
+ ]]></programlisting>
+        <scilab:image>
+            function z=surf1(x,y), z=x*y, endfunction
+            function z=surf2(x,y), z=x^2-y^2, endfunction
+            function z=surf3(x,y), z=x^3+y^2, endfunction
+            function z=surf4(x,y), z=x^2+y^2, endfunction
+            clf()
+            xset("colormap",[jetcolormap(64);hotcolormap(64)])
+            x = linspace(-1,1,60);
+            y = linspace(-1,1,60);
+            drawlater() ;
+            subplot(2,2,1)
+            colorbar(-1,1,[1,64])
+            Sfgrayplot(x,y,surf1,strf="041",colminmax=[1,64])
+            xtitle("f(x,y) = x*y")
+            subplot(2,2,2)
+            colorbar(-1,1,[65,128])
+            Sfgrayplot(x,y,surf2,strf="041",colminmax=[65,128])
+            xtitle("f(x,y) = x^2-y^2")
+            subplot(2,2,3)
+            colorbar(-1,2,[65,128])
+            Sfgrayplot(x,y,surf3,strf="041",colminmax=[65,128])
+            xtitle("f(x,y) = x^3+y^2")
+            subplot(2,2,4)
+            colorbar(0,2,[1,64])
+            Sfgrayplot(x,y,surf4,strf="041",colminmax=[1,64])
+            xtitle("f(x,y) = x^2+y^2")
+            drawnow() ;
+            show_window()
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 // example #2: plot surf3 and add some contour lines 
 function z=surf3(x,y), z=x^3+y^2, endfunction
 clf()
@@ -144,7 +170,22 @@ fcontour2d(x,y,surf3,[-0.1, 0.025, 0.4],style=[1 1 1],strf="000")
 xtitle("f(x,y) = x^3+y^2")
 drawnow() ;
 show_window()
-
+ ]]></programlisting>
+        <scilab:image>
+            function z=surf3(x,y), z=x^3+y^2, endfunction
+            clf()
+            x = linspace(-1,1,60);
+            y = linspace(-1,1,60);
+            xset("colormap",hotcolormap(128))
+            drawlater() ;
+            colorbar(-1,2)
+            Sfgrayplot(x,y,surf3,strf="041")
+            fcontour2d(x,y,surf3,[-0.1, 0.025, 0.4],style=[1 1 1],strf="000")
+            xtitle("f(x,y) = x^3+y^2")
+            drawnow() ;
+            show_window()
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 // example #3: plot surf3 and use zminmax and colout optional arguments
 //             to restrict the plot for -0.5<= z <= 1
 function z=surf3(x,y), z=x^3+y^2, endfunction
@@ -161,6 +202,21 @@ xtitle("f(x,y) = x^3+y^2, with parts under z = -0.5 and upper z = 1 removed")
 drawnow() ;
 show_window()
  ]]></programlisting>
+        <scilab:image>
+            function z=surf3(x,y), z=x^3+y^2, endfunction
+            clf()
+            x = linspace(-1,1,60);
+            y = linspace(-1,1,60);
+            xset("colormap",jetcolormap(128))
+            drawlater() ;
+            zminmax = [-0.5 1]; colors=[32 96];
+            colorbar(zminmax(1),zminmax(2),colors)
+            Sfgrayplot(x, y, surf3, strf="041", zminmax=zminmax, colout=[0 0], colminmax=colors)
+            fcontour2d(x,y,surf3,[-0.5, 1],style=[1 1 1],strf="000")
+            xtitle("f(x,y) = x^3+y^2, with parts under z = -0.5 and upper z = 1 removed")
+            drawnow() ;
+            show_window()
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 1663179..bd7f4fa 100644 (file)
@@ -275,10 +275,6 @@ _____________
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>Sgrayplot();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[
 // example #1
index 9cd3bd7..47c8355 100644 (file)
     </refsection>
     <refsection>
         <title>Sample</title>
-        <scilab:image>champ(-5:5,-5:5,rand(11,11),rand(11,11),rect=[-10,-10,10,10],arfact=2);</scilab:image>
+        
     </refsection>
     <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 // using rect as plot boundaries 
 champ(-5:5,-5:5,rand(11,11),rand(11,11),rect=[-10,-10,10,10],arfact=2)
+ ]]></programlisting>
+        <scilab:image>
+            champ(-5:5,-5:5,rand(11,11),rand(11,11),rect=[-10,-10,10,10],arfact=2);
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 // using (x,y) to get boundaries 
 clf()
 champ(-5:5,-5:5,rand(11,11),rand(11,11),2,[-10,-10,10,10],"021")
  ]]></programlisting>
+        <scilab:image>
+            champ(-5:5,-5:5,rand(11,11),rand(11,11),2,[-10,-10,10,10],"021")
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 85a8fce..500f842 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>champ1();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 champ1(-5:5,-5:5,rand(11,11),rand(11,11),rect=[-10,-10,10,10],arfact=2)
  ]]></programlisting>
+        <scilab:image>
+            champ1(-5:5,-5:5,rand(11,11),rand(11,11),rect=[-10,-10,10,10],arfact=2)
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 1628800..8f1c26f 100644 (file)
@@ -130,20 +130,23 @@ plot2d(x(im)',y(jm)',-9,"000")
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>contour2d(1:10,1:10,rand(10,10),5,rect=[0,0,11,11]);</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[
 contour2d(1:10,1:10,rand(10,10),5,rect=[0,0,11,11])
 // changing the format of the printing of the levels
 xset("fpf","%.2f")
  ]]></programlisting>
+        <scilab:image>
+            contour2d(1:10,1:10,rand(10,10),5,rect=[0,0,11,11]);
+            xset("fpf","%.2f")
+        </scilab:image>
         <programlisting role="example"><![CDATA[
 clf()
 contour2d(1:10,1:10,rand(10,10),5,rect=[0,0,11,11])
   ]]></programlisting>
+        <scilab:image>
+            contour2d(1:10,1:10,rand(10,10),5,rect=[0,0,11,11])
+        </scilab:image>
         <programlisting role="example"><![CDATA[
 // now an example with level numbers drawn in a legend
 // Caution there are a number of tricks...
@@ -167,6 +170,20 @@ contour2d(x,x,z,-0.75:0.25:0.75,frameflag=3,rect=[0,0,5*%pi,4*%pi])
 legends(string(-0.75:0.25:0.75),1:7,"lr");
 xtitle("Some level curves of the function cos(x)cos(y)")
  ]]></programlisting>
+        <scilab:image>
+            x = linspace(0,4*%pi,80);
+            z = cos(x')*cos(x);
+            
+            clf(); f=gcf();
+            xset("fpf"," ")
+            
+            f.color_map=jetcolormap(7);
+            
+            contour2d(x,x,z,-0.75:0.25:0.75,frameflag=3,rect=[0,0,5*%pi,4*%pi])
+            
+            legends(string(-0.75:0.25:0.75),1:7,"lr");
+            xtitle("Some level curves of the function cos(x)cos(y)")
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 28948dd..37e6bde 100644 (file)
@@ -49,7 +49,7 @@
                                     the number of level curves equally spaced from zmin to zmax as
                                     follows:
                                 </para>
-                                <programlisting role=""><![CDATA[ 
+                                <programlisting role="no-scilab-exec"><![CDATA[ 
 z= zmin + (1:nz)*(zmax-zmin)/(nz+1)
  ]]></programlisting>
                                 <para>
@@ -57,7 +57,7 @@ z= zmin + (1:nz)*(zmax-zmin)/(nz+1)
                                     <literal>zmax</literal> levels are not drawn (generically they
                                     are reduced to points) but they can be added with
                                 </para>
-                                <programlisting role=""><![CDATA[ 
+                                <programlisting role="no-scilab-exec"><![CDATA[ 
 [im,jm] = find(z == zmin);     // or zmax 
 plot2d(x(im)',y(jm)',-9,"000")
  ]]></programlisting>
@@ -110,14 +110,14 @@ plot2d(x(im)',y(jm)',-9,"000")
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>contourf();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 contourf(1:10,1:10,rand(10,10),5,1:5,"011"," ",[0,0,11,11])
-
+ ]]></programlisting>
+        <scilab:image>
+            contourf(1:10,1:10,rand(10,10),5,1:5,"011"," ",[0,0,11,11])
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 function z=peaks(x,y)
 x1=x(:).*.ones(1,size(y,'*'));
 y1=y(:)'.*.ones(size(x,'*'),1);
@@ -148,6 +148,34 @@ xset('fpf','');
 clf();
 contourf([],[],z,[-6:-1,-logspace(-5,0,10),logspace(-5,0,10),1:8]);
  ]]></programlisting>
+        <scilab:image>
+            function z=peaks(x,y)
+            x1=x(:).*.ones(1,size(y,'*'));
+            y1=y(:)'.*.ones(size(x,'*'),1);
+            z =  (3*(1-x1).^2).*exp(-(x1.^2) - (y1+1).^2) ... 
+            - 10*(x1/5 - x1.^3 - y1.^5).*exp(-x1.^2-y1.^2) ... 
+            - 1/3*exp(-(x1+1).^2 - y1.^2) 
+            endfunction
+            
+            function z=peakit()
+            x=-4:0.1:4;y=x;z=peaks(x,y);
+            endfunction
+            
+            z=peakit();
+            
+            levels=[-6:-1,-logspace(-5,0,10),logspace(-5,0,10),1:8];
+            m=size(levels,'*');
+            n = fix(3/8*m);
+            r = [(1:n)'/n; ones(m-n,1)];
+            g = [zeros(n,1); (1:n)'/n; ones(m-2*n,1)];
+            b = [zeros(2*n,1); (1:m-2*n)'/(m-2*n)];
+            h = [r g b];
+            xset('colormap',h);
+            xset('fpf',' ');
+            clf();
+            contourf([],[],z,[-6:-1,-logspace(-5,0,10),logspace(-5,0,10),1:8],0*ones(1,m))
+            
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 83b086a..947ed1f 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>errbar();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 t=[0:0.1:2*%pi]';
@@ -54,6 +50,12 @@ y=[sin(t) cos(t)]; x=[t t];
 plot2d(x,y)
 errbar(x,y,0.05*ones(x),0.03*ones(x))
  ]]></programlisting>
+        <scilab:image>
+            t=[0:0.1:2*%pi]';
+            y=[sin(t) cos(t)]; x=[t t];
+            plot2d(x,y)
+            errbar(x,y,0.05*ones(x),0.03*ones(x))
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 8feeb0c..bc77e36 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>fchamp();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 deff("[xdot] = derpol(t,x)",..
@@ -122,6 +118,15 @@ xf= -1:0.1:1;
 yf= -1:0.1:1;
 fchamp(derpol,0,xf,yf)
  ]]></programlisting>
+        <scilab:image>
+            deff("[xdot] = derpol(t,x)",..
+            ["xd1 = x(2)";..
+            "xd2 = -x(1) + (1 - x(1)**2)*x(2)";..
+            "xdot = [ xd1 ; xd2 ]"])
+            xf= -1:0.1:1;
+            yf= -1:0.1:1;
+            fchamp(derpol,0,xf,yf)
+        </scilab:image>
         <programlisting role="example"><![CDATA[ 
 deff("[xdot] = derpol(t,x)",..
         ["xd1 = x(2)";..
@@ -132,6 +137,16 @@ yf= -1:0.1:1;
 clf()
 fchamp(derpol,0,xf,yf,1,[-2,-2,2,2],"011")
  ]]></programlisting>
+        <scilab:image>
+            deff("[xdot] = derpol(t,x)",..
+            ["xd1 = x(2)";..
+            "xd2 = -x(1) + (1 - x(1)**2)*x(2)";..
+            "xdot = [ xd1 ; xd2 ]"])
+            xf= -1:0.1:1;
+            yf= -1:0.1:1;
+            clf()
+            fchamp(derpol,0,xf,yf,1,[-2,-2,2,2],"011")
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 6f960d3..8d6b2f5 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>fec();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 // define a mini triangulation (4 vertices, 2 triangles)
@@ -190,6 +186,24 @@ subplot(1,2,2)
   xtitle("fec example (without the mesh)")
 show_window()
  ]]></programlisting>
+        <scilab:image>
+            x = [0 1 0 -1];
+            y = [0 0 1  1];
+            T = [1 1 2 3 1;
+            2 3 4 1 1];
+            z = [0 1 0 -1];  // values of the func at each vertices
+            clf()
+            xset("colormap",jetcolormap(64))
+            subplot(1,2,1)
+            colorbar(-1,1)
+            fec(x,y,T,z,strf="040",mesh=%t)
+            xtitle("fec example (with the mesh)")
+            subplot(1,2,2)
+            colorbar(-1,1)
+            fec(x,y,T,z,strf="040")  // rmq: mesh=%f by default
+            xtitle("fec example (without the mesh)")
+            show_window()
+        </scilab:image>
         <programlisting role="example"><![CDATA[ 
 // define a mini triangulation (4 vertices, 2 triangles)
 x = [0 1 0 -1];
@@ -206,6 +220,21 @@ fec(x,y,T,z,strf="040", zminmax=[-0.5 0.5], mesh=%t)
 xtitle("fec example : using zminmax argument")
 show_window()
  ]]></programlisting>
+        <scilab:image>
+            x = [0 1 0 -1];
+            y = [0 0 1  1];
+            T = [1 1 2 3 1;
+            2 3 4 1 1];
+            z = [0 1 0 -1];  // values of the func at each vertices
+            // this example shows the effect of zminmax and uses the
+            // previous example data (you have to execute the it before)
+            clf()
+            xset("colormap",jetcolormap(64))
+            colorbar(-0.5,0.5)  // be careful colorbar must be set by hands !
+            fec(x,y,T,z,strf="040", zminmax=[-0.5 0.5], mesh=%t)
+            xtitle("fec example : using zminmax argument")
+            show_window()
+        </scilab:image>
         <programlisting role="example"><![CDATA[ 
 // define a mini triangulation (4 vertices, 2 triangles)
 x = [0 1 0 -1];
@@ -235,6 +264,35 @@ subplot(2,2,4)
   xtitle("fec example : using zminmax and colout =[0 -1]")
 show_window()
  ]]></programlisting>
+        <scilab:image>
+            // define a mini triangulation (4 vertices, 2 triangles)
+            x = [0 1 0 -1];
+            y = [0 0 1  1];
+            T = [1 1 2 3 1;
+            2 3 4 1 1];
+            z = [0 1 0 -1];  // values of the func at each vertices
+            // this example shows the effect of zminmax and colout. It uses
+            // also the data of the first example (you have to execute the it before)
+            clf()
+            xset("colormap",jetcolormap(64))
+            subplot(2,2,1)
+            colorbar(-0.5,0.5)
+            fec(x,y,T,z,strf="040", zminmax=[-0.5 0.5], colout=[0 0], mesh=%t)
+            xtitle("fec example : using zminmax and colout =[0 0]")
+            subplot(2,2,2)
+            colorbar(-0.5,0.5)
+            fec(x,y,T,z,strf="040", zminmax=[-0.5 0.5], colout=[32 32], mesh=%t)
+            xtitle("fec example : using zminmax and colout =[32 32]")
+            subplot(2,2,3)
+            colorbar(-0.5,0.5)
+            fec(x,y,T,z,strf="040", zminmax=[-0.5 0.5], colout=[-1 0], mesh=%t)
+            xtitle("fec example : using zminmax and colout =[-1 0]")
+            subplot(2,2,4)
+            colorbar(-0.5,0.5)
+            fec(x,y,T,z,strf="040", zminmax=[-0.5 0.5], colout=[0 -1], mesh=%t)
+            xtitle("fec example : using zminmax and colout =[0 -1]")
+            show_window()
+        </scilab:image>
         <programlisting role="example"><![CDATA[ 
 // define a mini triangulation (4 vertices, 2 triangles)
 x = [0 1 0 -1];
@@ -258,6 +316,29 @@ subplot(1,2,2)
   xtitle("fec using the jet colormap")
 show_window()
  ]]></programlisting>
+        <scilab:image>
+            // define a mini triangulation (4 vertices, 2 triangles)
+            x = [0 1 0 -1];
+            y = [0 0 1  1];
+            T = [1 1 2 3 1;
+            2 3 4 1 1];
+            z = [0 1 0 -1];  // values of the func at each vertices
+            
+            // this example shows a feature from colminmax:
+            // playing with 2 colormaps for 2 subplots. It
+            // uses also the data of the first example.
+            clf()
+            xset("colormap",[hotcolormap(64);jetcolormap(64)])
+            subplot(1,2,1)
+            colorbar(-1,1,[1 64])
+            fec(x,y,T,z,strf="040", colminmax=[1 64], mesh=%t)
+            xtitle("fec using the hot colormap")
+            subplot(1,2,2)
+            colorbar(-1,1,[65 128])
+            fec(x,y,T,z,strf="040", colminmax=[65 128], mesh=%t)
+            xtitle("fec using the jet colormap")
+            show_window()
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 1db2b7a..ee3d096 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>fgrayplot();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 t=-1:0.1:1;
 deff("[z]=my_surface(x,y)","z=x**2+y**2")
 fgrayplot(t,t,my_surface,rect=[-2,-2,2,2])
  ]]></programlisting>
+        <scilab:image>
+            t=-1:0.1:1;
+            deff("[z]=my_surface(x,y)","z=x**2+y**2")
+            fgrayplot(t,t,my_surface,rect=[-2,-2,2,2])
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index b9d348a..bd51563 100644 (file)
 deff("[y]=f(x)","y=sin(x)+cos(x)")
 x=[0:0.1:10]*%pi/10;
 fplot2d(x,f)
+ ]]></programlisting>
+        <scilab:image>
+            deff("[y]=f(x)","y=sin(x)+cos(x)")
+            x=[0:0.1:10]*%pi/10;
+            fplot2d(x,f)
+        </scilab:image>
+        
+        <programlisting role="example"><![CDATA[ 
 clf();
+deff("[y]=f(x)","y=sin(x)+cos(x)")
+x=[0:0.1:10]*%pi/10;
+fplot2d(x,f)
 fplot2d(1:10,'parab')
  ]]></programlisting>
+        <scilab:image>
+            deff("[y]=f(x)","y=sin(x)+cos(x)")
+            x=[0:0.1:10]*%pi/10;
+            fplot2d(1:10,'parab')
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 68470f0..deb254d 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>grayplot();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
-x=-10:10; y=-10:10;m =rand(21,21);
+x=-10:10;
+y=-10:10;
+m=rand(21,21);
 grayplot(x,y,m,rect=[-20,-20,20,20])
-t=-%pi:0.1:%pi; m=sin(t)'*cos(t);
+ ]]></programlisting>
+        <scilab:image>
+            x=-10:10;
+            y=-10:10;
+            m=rand(21,21);
+            grayplot(x,y,m,rect=[-20,-20,20,20])
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
+t=-%pi:0.1:%pi;
+m=sin(t)'*cos(t);
 clf()
 grayplot(t,t,m)
  ]]></programlisting>
+        <scilab:image>
+            t=-%pi:0.1:%pi;
+            m=sin(t)'*cos(t);
+            clf()
+            grayplot(t,t,m)
+            
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 2df9188..3a6d065 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>rho=1:0.1:4;theta=(0:0.02:1)*2*%pi;
-            z=30+round(theta'*(1+rho^2));
-            f=gcf();
-            f.color_map= hotcolormap(128);
-            graypolarplot(theta,rho,z)
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 rho=1:0.1:4;theta=(0:0.02:1)*2*%pi;
@@ -230,5 +221,11 @@ f=gcf();
 f.color_map= hotcolormap(128);
 clf();graypolarplot(theta,rho,z)
  ]]></programlisting>
+        <scilab:image>rho=1:0.1:4;theta=(0:0.02:1)*2*%pi;
+            z=30+round(theta'*(1+rho^2));
+            f=gcf();
+            f.color_map= hotcolormap(128);
+            graypolarplot(theta,rho,z)
+        </scilab:image>
     </refsection>
 </refentry>
index b3d0f0f..f1dc15c 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>histplot();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <simplelist>
             <member>
@@ -128,7 +124,7 @@ subplot(2,1,2)
 histplot(c, d, normalization=%f, style=5)
 xtitle("non normalized histogram")
 ]]></programlisting>
-                <scilab:image>
+                <scilab:image localized="true">
                     d = grand(1000,1,"bin", 6, 0.5);
                     c = linspace(-0.5,6.5,8);
                     clf()
@@ -152,7 +148,8 @@ x = linspace(0,max(Xmax),100)';
 plot2d(x,lambda*exp(-lambda*x),strf="000",style=5)
 legend(["exponential random sample histogram" "exact density curve"]);
 ]]></programlisting>
-                <scilab:image>
+                <scilab:image localized="true">
+                    
                     lambda = 2;
                     X = grand(100000,1,"exp", 1/lambda);
                     Xmax = max(X);
index f45d466..e0c7ce7 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>plot();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 // x initialisation 
 x=[0:0.1:2*%pi]';
 //simple plot
 plot(sin(x))
+ ]]></programlisting>
+        <scilab:image>
+            x=[0:0.1:2*%pi]';
+            plot(sin(x))
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 clf()
+x=[0:0.1:2*%pi]';
 plot(x,sin(x))
-//multiple plot
+ ]]></programlisting>
+        <scilab:image>
+            x=[0:0.1:2*%pi]';
+            plot(x,sin(x))
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 clf()
+//multiple plot
+x=[0:0.1:2*%pi]';
 plot(x,[sin(x) sin(2*x) sin(3*x)])
+ ]]></programlisting>
+        <scilab:image>
+            x=[0:0.1:2*%pi]';
+            plot(x,[sin(x) sin(2*x) sin(3*x)])
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 clf()
-
+x=[0:0.1:2*%pi]';
 // axis on the right 
 plot(x,sin(x)) 
 a=gca(); // Handle on current axes entity 
 a.y_location ="right"; 
 clf()
-
+ ]]></programlisting>
+        <scilab:image>
+            x=[0:0.1:2*%pi]';
+            plot(x,sin(x)) 
+            a=gca();
+            a.y_location ="right"; 
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
+x=[0:0.1:2*%pi]';
 // axis centered at (0,0)
 plot(x-4,sin(x),x+2,cos(x))
 a=gca(); // Handle on axes entity
@@ -296,6 +320,25 @@ poly1.foreground = 4; // another way to change the style...
 poly1.thickness = 3;  // ...and the tickness of a curve.
 poly1.clip_state='off' // clipping control
 a.isoview='off'; 
+ ]]></programlisting>
+        <scilab:image>
+            x=[0:0.1:2*%pi]';
+            plot(x-4,sin(x),x+2,cos(x))
+            a=gca();
+            a.x_location = "origin";
+            a.y_location = "origin";
+            
+            a=gca();
+            a.isoview='on';
+            a.children
+            poly1= a.children.children(2);
+            poly1.foreground = 4;
+            poly1.thickness = 3;
+            poly1.clip_state='off'
+            a.isoview='off';
+            
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 
 //LineSpec and GlobalProperty examples:
 clf();
@@ -308,23 +351,61 @@ axfig3 = gca();
 scf(4) // should remain blank
 plot(axfig3,[t ;t],[sin(t) ;cos(t)],'zdat',[1:2],'marker','d','markerfac','green','markeredg','yel')
 xdel(winsid())
-
+ ]]></programlisting>
+        <scilab:image>
+            t=0:%pi/20:2*%pi;
+            plot(t,sin(t),'ro-.',t,cos(t),'cya+',t,abs(sin(t)),'--mo')
+            scf(2)
+            plot([t ;t],[sin(t) ;cos(t)],'xdat',[1:2])
+            scf(3)
+            axfig3 = gca();
+            scf(4) // should remain blank
+            plot(axfig3,[t ;t],[sin(t) ;cos(t)],'zdat',[1:2],'marker','d','markerfac','green','markeredg','yel')
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 //Data specification
 t=-%pi:0.1:%pi;
 size(t)
 plot(t) // simply plots y versus t vector size
+ ]]></programlisting>
+        <scilab:image>
+            t=-%pi:0.1:%pi;
+            size(t)
+            plot(t)
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 clf(); // clear figure
-
+t=-%pi:0.1:%pi;
 plot(t,sin(t)); // plots sin(t) versus t
-clf();
 
+ ]]></programlisting>
+        <scilab:image>
+            t=-%pi:0.1:%pi;
+            plot(t,sin(t));
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
+clf();
 t=[1     1     1     1
    2     3     4     5
    3     4     5     6
    4     5     6     7];
 
 plot(t) // plots each t column versus row size
+ ]]></programlisting>
+        <scilab:image>
+            t=[1     1     1     1
+            2     3     4     5
+            3     4     5     6
+            4     5     6     7];
+            
+            plot(t) // plots each t column versus row size
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 clf();
+t=[1     1     1     1
+   2     3     4     5
+   3     4     5     6
+   4     5     6     7];
 
 subplot(221)
 plot(t,sin(t)); // plots sin(t) versus t column by column this time
@@ -341,14 +422,60 @@ subplot(224)
 plot(t',sin(t)')
 xtitle("sin(t)'' versus t''")
 
+ ]]></programlisting>
+        <scilab:image>
+            t=[1     1     1     1
+            2     3     4     5
+            3     4     5     6
+            4     5     6     7];
+            
+            subplot(221)
+            plot(t,sin(t)); // plots sin(t) versus t column by column this time
+            xtitle("sin(t) versus t")
+            subplot(222)
+            plot(t,sin(t)')
+            xtitle("sin(t)'' versus t")
+            subplot(223)
+            plot(t',sin(t))
+            a=gca();
+            a.data_bounds=[0 -1;7 1]; // to see the vertical line hiddden by the y axis
+            xtitle("sin(t) versus t''")
+            subplot(224)
+            plot(t',sin(t)')
+            xtitle("sin(t)'' versus t''")
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
+
 clf();
+t=[1     1     1     1
+   2     3     4     5
+   3     4     5     6
+   4     5     6     7];
 
 //Special case 1
 //x : vector ([5 6 7 8]) and y : matrix (t)
 x=[5 6 7 8]
 plot(x,t);
 plot(x',t); // idem, x is automatically transposed to match t (here the columns)
+ ]]></programlisting>
+        <scilab:image>
+            t=[1     1     1     1
+            2     3     4     5
+            3     4     5     6
+            4     5     6     7];
+            
+            x=[5 6 7 8]
+            plot(x,t);
+            plot(x',t);
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 clf()
+x=[5 6 7 8]
+
+t=[1     1     1     1
+   2     3     4     5
+   3     4     5     6
+   4     5     6     7];
 
 // Only one matching possibility case : how to make 4 identical plots in 4 manners...
 // x is 1x4 (vector) and y is 4x5 (non square matrix)
@@ -360,29 +487,94 @@ subplot(223);
 plot(x,[t [8;9;10;12]]');
 subplot(224);
 plot(x',[t [8;9;10;12]]');
+ ]]></programlisting>
+        <scilab:image>
+            x=[5 6 7 8]
+            
+            t=[1     1     1     1
+            2     3     4     5
+            3     4     5     6
+            4     5     6     7];
+            
+            // Only one matching possibility case : how to make 4 identical plots in 4 manners...
+            // x is 1x4 (vector) and y is 4x5 (non square matrix)
+            subplot(221);
+            plot(x,[t [8;9;10;12]]');
+            subplot(222);
+            plot(x',[t [8;9;10;12]]');
+            subplot(223);
+            plot(x,[t [8;9;10;12]]');
+            subplot(224);
+            plot(x',[t [8;9;10;12]]');
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 clf()
 
+t=[1     1     1     1
+   2     3     4     5
+   3     4     5     6
+   4     5     6     7];
+
 //Special case 2
 // Case where only x or y is a square matrix
 //x : matrix (t) and y  : vector ([1 2 3 4])
 plot(t,[1 2 3 4]) // equivalent to plot(t,[1 1 1 1;2 2 2 2;3 3 3 3;4 4 4 4])
 plot(t,[1;2;3;4]) // the same plot
+ ]]></programlisting>
+        <scilab:image>
+            t=[1     1     1     1
+            2     3     4     5
+            3     4     5     6
+            4     5     6     7];
+            
+            //Special case 2
+            // Case where only x or y is a square matrix
+            //x : matrix (t) and y  : vector ([1 2 3 4])
+            plot(t,[1 2 3 4]) // equivalent to plot(t,[1 1 1 1;2 2 2 2;3 3 3 3;4 4 4 4])
+            plot(t,[1;2;3;4]) // the same plot
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
+t=[1     1     1     1
+   2     3     4     5
+   3     4     5     6
+   4     5     6     7];
 clf();
 
 // t is transposed : notice the priority given to the columns treatment
 plot(t',[1 2 3 4]) // equivalent to plot(t',[1 1 1 1;2 2 2 2;3 3 3 3;4 4 4 4]) 
 plot(t',[1 2 3 4]') // the same plot 
+ ]]></programlisting>
+        <scilab:image>
+            t=[1     1     1     1
+            2     3     4     5
+            3     4     5     6
+            4     5     6     7];
+            clf();
+            
+            // t is transposed : notice the priority given to the columns treatment
+            plot(t',[1 2 3 4]) // equivalent to plot(t',[1 1 1 1;2 2 2 2;3 3 3 3;4 4 4 4]) 
+            plot(t',[1 2 3 4]') // the same plot 
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 clf();
-
 // y is a function defined by..
 // ..a primitive
 plot(1:0.1:10,sin) // equivalent to plot(1:0.1:10,sin(1:0.1:10))
-clf();
 
+ ]]></programlisting>
+        <scilab:image>
+            plot(1:0.1:10,sin)
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
+clf();
 // ..a macro:
 deff('[y]=toto(x)','y=x.*x')
 plot(1:10,toto)
  ]]></programlisting>
+        <scilab:image>
+            deff('[y]=toto(x)','y=x.*x')
+            plot(1:10,toto)
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index aac58a4..65f7bc4 100644 (file)
         </itemizedlist>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>plot2d();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 // x initialisation 
 x=[0:0.1:2*%pi]';
 //simple plot
 plot2d(sin(x));
+ ]]></programlisting>
+        <scilab:image>
+            x=[0:0.1:2*%pi]';
+            plot2d(sin(x));
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 clf();
+x=[0:0.1:2*%pi]';
 plot2d(x,sin(x));
 //multiple plot
+ ]]></programlisting>
+        <scilab:image>
+            x=[0:0.1:2*%pi]';
+            plot2d(x,sin(x));
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 clf();
+x=[0:0.1:2*%pi]';
 plot2d(x,[sin(x) sin(2*x) sin(3*x)])
+ ]]></programlisting>
+        <scilab:image>
+            x=[0:0.1:2*%pi]';
+            plot2d(x,[sin(x) sin(2*x) sin(3*x)])
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 // multiple plot giving the dimensions of the frame
 clf();
+x=[0:0.1:2*%pi]';
 plot2d(x,[sin(x) sin(2*x) sin(3*x)],rect=[0,0,6,0.5]);
+ ]]></programlisting>
+        <scilab:image>
+            x=[0:0.1:2*%pi]';
+            plot2d(x,[sin(x) sin(2*x) sin(3*x)],rect=[0,0,6,0.5]);
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 //multiple plot with captions and given tics + style
 clf();
+x=[0:0.1:2*%pi]';
 plot2d(x,[sin(x) sin(2*x) sin(3*x)],..
        [1,2,3],leg="L1@L2@L3",nax=[2,10,2,10],rect=[0,-2,2*%pi,2]);
+ ]]></programlisting>
+        <scilab:image>
+            x=[0:0.1:2*%pi]';
+            plot2d(x,[sin(x) sin(2*x) sin(3*x)],..
+            [1,2,3],leg="L1@L2@L3",nax=[2,10,2,10],rect=[0,-2,2*%pi,2]);
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 // isoview
 clf();
+x=[0:0.1:2*%pi]';
 plot2d(x,sin(x),1,frameflag= 4);
+ ]]></programlisting>
+        <scilab:image>
+            x=[0:0.1:2*%pi]';
+            plot2d(x,sin(x),1,frameflag= 4);
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 // scale 
 clf();
+x=[0:0.1:2*%pi]';
 plot2d(x,sin(x),1,frameflag= 6);
+ ]]></programlisting>
+        <scilab:image>
+            x=[0:0.1:2*%pi]';
+            plot2d(x,sin(x),1,frameflag= 6);
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 // auto scaling with previous plots + style
 clf();
+x=[0:0.1:2*%pi]';
 plot2d(x,sin(x),-1);
 plot2d(x,2*sin(x),12); 
 plot2d(2*x,cos(x),3);
+ ]]></programlisting>
+        <scilab:image>
+            x=[0:0.1:2*%pi]';
+            plot2d(x,sin(x),-1);
+            plot2d(x,2*sin(x),12); 
+            plot2d(2*x,cos(x),3);
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 // axis on the right 
 clf();
+x=[0:0.1:2*%pi]';
 plot2d(x,sin(x),leg="sin(x)");
 a=gca(); // Handle on axes entity 
 a.y_location ="right"; 
+ ]]></programlisting>
+        <scilab:image>
+            x=[0:0.1:2*%pi]';
+            plot2d(x,sin(x),leg="sin(x)");
+            a=gca(); // Handle on axes entity 
+            a.y_location ="right"; 
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
+
 // axis centered at (0,0) 
 clf();
+x=[0:0.1:2*%pi]';
 plot2d(x-4,sin(x),1,leg="sin(x)");
 a=gca(); // Handle on axes entity
 a.x_location = "origin"; 
@@ -721,6 +786,30 @@ leg.font_style = 9;
 leg.line_mode = "on";
 a.isoview='off';
  ]]></programlisting>
+        <scilab:image>
+            
+            // axis centered at (0,0) 
+            clf();
+            x=[0:0.1:2*%pi]';
+            plot2d(x-4,sin(x),1,leg="sin(x)");
+            a=gca(); // Handle on axes entity
+            a.x_location = "origin"; 
+            a.y_location = "origin"; 
+            // Some operations on entities created by plot2d ...
+            a=gca();
+            a.isoview='on'; 
+            a.children // list the children of the axes.
+            // There are a compound made of two polylines and a legend 
+            poly1= a.children(1).children(1); //store polyline handle into poly1 
+            poly1.foreground = 4; // another way to change the style...
+            poly1.thickness = 3;  // ...and the tickness of a curve.
+            poly1.clip_state='off'; // clipping control
+            leg = a.children(2); // store legend handle into leg
+            leg.font_style = 9; 
+            leg.line_mode = "on";
+            a.isoview='off';
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index da7815e..7cc78a4 100644 (file)
@@ -6,7 +6,7 @@
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms
- * are also available at    
+ * are also available at
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>plot2d1();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 // multiple plot without giving x
 x=[0:0.1:2*%pi]';
 plot2d1("enn",1,[sin(x) sin(2*x) sin(3*x)])
+ ]]></programlisting>
+        <scilab:image>
+            x=[0:0.1:2*%pi]';
+            plot2d1("enn",1,[sin(x) sin(2*x) sin(3*x)])
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 // multiple plot using only one x
 clf()
+x=[0:0.1:2*%pi]';
 plot2d1("onn",x,[sin(x) sin(2*x) sin(3*x)])
+ ]]></programlisting>
+        <scilab:image>
+            x=[0:0.1:2*%pi]';
+            plot2d1("onn",x,[sin(x) sin(2*x) sin(3*x)])
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 // logarithmic plot
-x=[0.1:0.1:3]'; clf()
+x=[0.1:0.1:3]';
+clf();
 plot2d1("oll",x,[exp(x) exp(x^2) exp(x^3)])
  ]]></programlisting>
+        <scilab:image>
+            x=[0.1:0.1:3]';
+            plot2d1("oll",x,[exp(x) exp(x^2) exp(x^3)])
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index fa24eeb..f22ca2e 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>plot2d2();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 // plots a step function of value i on the segment [i,i+1]
 // the last segment is not drawn
 plot2d2([1:4],[1:4],1,"111","step function",[0,0,5,5])
+ ]]></programlisting>
+        <scilab:image>
+            plot2d2([1:4],[1:4],1,"111","step function",[0,0,5,5])
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 // compare the following with plot2d
 x=[0:0.1:2*%pi]';
 clf()
 plot2d2(x,[sin(x) sin(2*x) sin(3*x)])
+ ]]></programlisting>
+        <scilab:image>
+            x=[0:0.1:2*%pi]';
+            plot2d2(x,[sin(x) sin(2*x) sin(3*x)])
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
+x=[0:0.1:2*%pi]';
 clf();
 plot2d(x,[sin(x) sin(2*x) sin(3*x)])
 e=gce();
@@ -75,6 +83,14 @@ e.children(1).polyline_style=2;
 e.children(2).polyline_style=2;
 e.children(3).polyline_style=2;
  ]]></programlisting>
+        <scilab:image>
+            x=[0:0.1:2*%pi]';
+            plot2d(x,[sin(x) sin(2*x) sin(3*x)])
+            e=gce();
+            e.children(1).polyline_style=2;
+            e.children(2).polyline_style=2;
+            e.children(3).polyline_style=2;
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 8f68be9..ba91db4 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>plot2d3();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 // compare the following with plot2d1
 x=[0:0.1:2*%pi]';
 plot2d3(x,[sin(x) sin(2*x) sin(3*x)])
+ ]]></programlisting>
+        <scilab:image>
+            x=[0:0.1:2*%pi]';
+            plot2d3(x,[sin(x) sin(2*x) sin(3*x)])
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 clf()
+x=[0:0.1:2*%pi]';
 plot2d(x,[sin(x) sin(2*x) sin(3*x)])
 e=gce();
 e.children(1).polyline_style=3;
 e.children(2).polyline_style=3;
 e.children(3).polyline_style=3;
  ]]></programlisting>
+        <scilab:image>
+            x=[0:0.1:2*%pi]';
+            plot2d(x,[sin(x) sin(2*x) sin(3*x)])
+            e=gce();
+            e.children(1).polyline_style=3;
+            e.children(2).polyline_style=3;
+            e.children(3).polyline_style=3;
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 15de0ae..bbe2d27 100644 (file)
@@ -69,6 +69,11 @@ e.children(1).polyline_style=4;
 e.children(2).polyline_style=4;
 e.children(3).polyline_style=4;
  ]]></programlisting>
+        <scilab:image>
+            x=[0:0.1:2*%pi]';
+            plot2d4(x,[sin(x) sin(2*x) sin(3*x)])
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index cda41cf..b929735 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>polarplot();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Example 1</title>
         <programlisting role="example"><![CDATA[
 t= 0:.01:2*%pi;
index 63d4850..5a9ba27 100644 (file)
@@ -315,25 +315,46 @@ plot2d(x(im)',y(jm)',-9,"000")
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>contour();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 t=linspace(-%pi,%pi,30);
 function z=my_surface(x,y),z=x*sin(x)^2*cos(y),endfunction
-
 contour(t,t,my_surface,10)
+ ]]></programlisting>
+        <scilab:image>
+            t=linspace(-%pi,%pi,30);
+            function z=my_surface(x,y),z=x*sin(x)^2*cos(y),endfunction
+            contour(t,t,my_surface,10)
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
+t=linspace(-%pi,%pi,30);
 // changing the format of the printing of the levels
 xset("fpf","%.1f")
 clf()
+function z=my_surface(x,y),z=x*sin(x)^2*cos(y),endfunction
 contour(t,t,my_surface,10)
+ ]]></programlisting>
+        <scilab:image>
+            t=linspace(-%pi,%pi,30);
+            // changing the format of the printing of the levels
+            xset("fpf","%.1f")
+            clf()
+            function z=my_surface(x,y),z=x*sin(x)^2*cos(y),endfunction
+            contour(t,t,my_surface,10)
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
 // 3D
-clf()
+t=linspace(-%pi,%pi,30);
+function z=my_surface(x,y),z=x*sin(x)^2*cos(y),endfunction
 z=feval(t,t,my_surface);
 plot3d(t,t,z);contour(t,t,z+0.2*abs(z),20,flag=[0 2 4]);
  ]]></programlisting>
+        <scilab:image>
+            t=linspace(-%pi,%pi,30);
+            function z=my_surface(x,y),z=x*sin(x)^2*cos(y),endfunction
+            z=feval(t,t,my_surface);
+            plot3d(t,t,z);contour(t,t,z+0.2*abs(z),20,flag=[0 2 4]);
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 5e72b60..b95df9f 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>x=-5:5;y=x;
-            deff('[z]=f(x,y)',['z= x.*y']);
-            z=eval3d(f,x,y);
-            plot3d(x,y,z);
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 x=-5:5;y=x;
@@ -72,6 +64,12 @@ deff('[z]=f(x,y)',['z= x*y']);
 z=feval(x,y,f);
 plot3d(x,y,z);
  ]]></programlisting>
+        <scilab:image>x=-5:5;y=x;
+            deff('[z]=f(x,y)',['z= x.*y']);
+            z=eval3d(f,x,y);
+            plot3d(x,y,z);
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 588f0ec..54d30fe 100644 (file)
             surface, as [x(i),y(i),z(i)]=fun(p1(i),p2(i)). This is used for efficiency.
         </para>
     </refsection>
-    <refsection>
-        <title>Sample</title>
-        <scilab:image>p1=linspace(0,2*%pi,10);
-            p2=linspace(0,2*%pi,10);
-            deff("[x,y,z]=scp(p1,p2)",["x=p1.*sin(p1).*cos(p2)";..
-            "y=p1.*cos(p1).*cos(p2)";..
-            "z=p1.*sin(p2)"])
-            [Xf,Yf,Zf]=eval3dp(scp,p1,p2);
-            plot3d(Xf,Yf,Zf)
-        </scilab:image>
-    </refsection>
     
     <refsection>
         <title>Examples</title>
@@ -86,6 +75,14 @@ deff("[x,y,z]=scp(p1,p2)",["x=p1.*sin(p1).*cos(p2)";..
 [Xf,Yf,Zf]=eval3dp(scp,p1,p2);
 plot3d(Xf,Yf,Zf)
  ]]></programlisting>
+        <scilab:image>p1=linspace(0,2*%pi,10);
+            p2=linspace(0,2*%pi,10);
+            deff("[x,y,z]=scp(p1,p2)",["x=p1.*sin(p1).*cos(p2)";..
+            "y=p1.*cos(p1).*cos(p2)";..
+            "z=p1.*sin(p2)"])
+            [Xf,Yf,Zf]=eval3dp(scp,p1,p2);
+            plot3d(Xf,Yf,Zf)
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index d843449..197eeec 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>fplot3d();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 deff('z=f(x,y)','z=x^4-y^4')
 x=-3:0.2:3 ;y=x ;
 clf() ;fplot3d(x,y,f,alpha=5,theta=31)  
  ]]></programlisting>
+        <scilab:image>
+            deff('z=f(x,y)','z=x^4-y^4')
+            x=-3:0.2:3 ;y=x ;
+            clf() ;fplot3d(x,y,f,alpha=5,theta=31)  
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 03826f3..9c3c6dc 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>fplot3d1();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 deff('z=f(x,y)','z=x^4-y^4')
 x=-3:0.2:3 ;y=x ;
 clf() ;fplot3d1(x,y,f,alpha=5,theta=31)  
  ]]></programlisting>
+        <scilab:image>
+            deff('z=f(x,y)','z=x^4-y^4')
+            x=-3:0.2:3 ;y=x ;
+            clf() ;fplot3d1(x,y,f,alpha=5,theta=31)  
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index a9e3159..dafd0bd 100644 (file)
             <literal>z=f(x,y)</literal> defined by <literal>x</literal>, <literal>y</literal> and <literal>z</literal>.
         </para>
     </refsection>
-    <refsection>
-        <title>Sample</title>
-        <scilab:image>genfac3d();</scilab:image>
-    </refsection>
+    
     <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
@@ -79,6 +76,13 @@ z=sin(t)*cos(t');
 [xx,yy,zz]=genfac3d(t,t,z);
 plot3d(xx,yy,zz)
  ]]></programlisting>
+        
+        <scilab:image>
+            t=[0:0.3:2*%pi]'; 
+            z=sin(t)*cos(t');
+            [xx,yy,zz]=genfac3d(t,t,z);
+            plot3d(xx,yy,zz)
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index d26c56c..7516dcd 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>deff("[z]=surface(x,y)","z=sin(x)*cos(y)")
-            t=%pi*(-10:10)/10;
-            // 3D plot of the surface
-            fplot3d(t,t,surface,35,45,"X@Y@Z")
-            // now (t,t,sin(t).*cos(t)) is a curve on the surface
-            // which can be drawn using geom3d and xpoly
-            [x,y]=geom3d(%pi/2,0,surface(%pi/2,0))
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 deff("[z]=surface(x,y)","z=sin(x)*cos(y)")
@@ -74,5 +63,10 @@ fplot3d(t,t,surface,35,45,"X@Y@Z")
 // which can be drawn using geom3d and xpoly
 [x,y]=geom3d(%pi/2,0,surface(%pi/2,0))
  ]]></programlisting>
+        <scilab:image>deff("[z]=surface(x,y)","z=sin(x)*cos(y)")
+            t=%pi*(-10:10)/10;
+            fplot3d(t,t,surface,35,45,"X@Y@Z")
+            [x,y]=geom3d(%pi/2,0,surface(%pi/2,0))
+        </scilab:image>
     </refsection>
 </refentry>
index 363b770..7b6ffb5 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>hist3d();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 hist3d(10*rand(10,10));
@@ -107,6 +103,7 @@ Z(91:100,:) = A;
 scf();
 hist3d(Z); 
  ]]></programlisting>
+        <scilab:image>hist3d();</scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 9d9025c..c1da5ad 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>mesh();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 [X,Y]=meshgrid(-1:.1:1,-1:.1:1);
@@ -121,6 +117,12 @@ Z=X.^2-Y.^2;
 xtitle('z=x2-y ^2');
 mesh(X,Y,Z);
  ]]></programlisting>
+        <scilab:image>
+            [X,Y]=meshgrid(-1:.1:1,-1:.1:1);
+            Z=X.^2-Y.^2;
+            xtitle('z=x2-y ^2');
+            mesh(X,Y,Z);
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index cd95262..62696b6 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>x=-2:0.1:2;
-            y=x;
-            z=eval3d(milk_drop,x,y);
-            plot3d(x,y,z)
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 x=-2:0.1:2;
@@ -60,6 +52,11 @@ y=x;
 z=eval3d(milk_drop,x,y);
 plot3d(x,y,z)
  ]]></programlisting>
+        <scilab:image>x=-2:0.1:2;
+            y=x;
+            z=eval3d(milk_drop,x,y);
+            plot3d(x,y,z)
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 6e80a6c..b965836 100644 (file)
             Enter the command <literal>param3d()</literal> to see a demo.
         </para>
     </refsection>
-    <refsection>
-        <title>Sample</title>
-        <scilab:image>param3d();</scilab:image>
-    </refsection>
+    
     <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
@@ -234,6 +231,17 @@ e.foreground=color('red');
 a=gca(); //the handle on the axes
 a.rotation_angles=[10 70];
  ]]></programlisting>
+        <scilab:image>
+            t=0:0.1:5*%pi;
+            param3d(sin(t),cos(t),t/10,35,45,"X@Y@Z",[2,3])
+            
+            e=gce() //the handle on the 3D polyline
+            
+            e.foreground=color('red');
+            
+            a=gca(); //the handle on the axes
+            a.rotation_angles=[10 70];
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index b195756..d6d07aa 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>param3d1();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 xset('window',20) // create a window number 20
@@ -252,6 +248,7 @@ curve2 = h.children(2);
 curve2.foreground = 6;
 curve2.mark_style = 2;
  ]]></programlisting>
+        <scilab:image>param3d1();</scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index bbce140..e149570 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>plot3d();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[
 // simple plot using z=f(x,y)
@@ -418,6 +414,7 @@ TL.color = [c;c+1;c+2;c+3];
 h.data = TL;
 h.color_flag=3; // interpolated shading mode
  ]]></programlisting>
+        <scilab:image>plot3d();</scilab:image>
         <para>We can use the plot3d function to plot a set of patches (triangular,
             quadrangular, etc).
         </para>
index 3839429..08dcc33 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>u = linspace(-%pi/2,%pi/2,40);
-            v = linspace(0,2*%pi,20);
-            X = cos(u)'*cos(v);
-            Y = cos(u)'*sin(v);
-            Z = sin(u)'*ones(v);
-            plot3d2(X,Y,Z);
-            e=gce();
-            e.color_mode=4; // change color
-            f_data=e.data;
-            TL = tlist(["3d" "x" "y" "z" "color"],f_data.x,f_data.y,f_data.z,10*(f_data.z)+1);
-            e.data=TL;
-            e.color_flag=2;
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[
 u = linspace(-%pi/2,%pi/2,40);
@@ -302,6 +286,20 @@ TL = tlist(["3d" "x" "y" "z" "color"],f_data.x,f_data.y,f_data.z,10*(f_data.z)+1
 e.data=TL;
 e.color_flag=2;
  ]]></programlisting>
+        <scilab:image>u = linspace(-%pi/2,%pi/2,40);
+            v = linspace(0,2*%pi,20);
+            X = cos(u)'*cos(v);
+            Y = cos(u)'*sin(v);
+            Z = sin(u)'*ones(v);
+            plot3d2(X,Y,Z);
+            e=gce();
+            e.color_mode=4; // change color
+            f_data=e.data;
+            TL = tlist(["3d" "x" "y" "z" "color"],f_data.x,f_data.y,f_data.z,10*(f_data.z)+1);
+            e.data=TL;
+            e.color_flag=2;
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 3f050bf..2917546 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>u = linspace(-%pi/2,%pi/2,40);
-            v = linspace(0,2*%pi,20);
-            X = cos(u)'*cos(v);
-            Y = cos(u)'*sin(v);
-            Z = sin(u)'*ones(v);
-            plot3d3(X,Y,Z);
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 u = linspace(-%pi/2,%pi/2,40);
@@ -266,6 +256,14 @@ e=gce(); // get the current entity
 e.visible='off';
 e.visible='on'; // back to the mesh view
  ]]></programlisting>
+        <scilab:image>u = linspace(-%pi/2,%pi/2,40);
+            v = linspace(0,2*%pi,20);
+            X = cos(u)'*cos(v);
+            Y = cos(u)'*sin(v);
+            Z = sin(u)'*ones(v);
+            plot3d3(X,Y,Z);
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index f51c2d2..3165d3e 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>surf();</scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 // Z initialisation 
@@ -304,6 +300,7 @@ surf(axfig10,Z,'ydat',[100:109],'marker','d','markerfac','green','markeredg','ye
 
 xdel(winsid())
  ]]></programlisting>
+        <scilab:image>surf();</scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index ec3a57b..b388aea 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            t=0:0.1:2*%pi;
-            a=gca();a.data_bounds=[t(1) -1.8;t($) 1.8];
-            a.margins(4)=0.2;
-            
-            plot2d(t,[cos(t'),cos(2*t'),cos(3*t')],[1,2 3]);  
-            e=gce();
-            e.children(1).thickness=3;
-            e.children(2).line_style=4;
-            
-            hl=captions(e.children,['cos(t)';'cos(2*t)';'cos(3*t)']);
-            hl=captions(e.children,['cos(t)';'cos(2*t)';'cos(3*t)'],'in_upper_right');
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 t=0:0.1:2*%pi;
@@ -178,6 +162,20 @@ hl=captions(e.children,['cos(t)';'cos(2*t)';'cos(3*t)'],'in_upper_right');
 hl.legend_location='in_upper_right'
 hl.fill_mode='on';
  ]]></programlisting>
+        <scilab:image>
+            t=0:0.1:2*%pi;
+            a=gca();a.data_bounds=[t(1) -1.8;t($) 1.8];
+            a.margins(4)=0.2;
+            
+            plot2d(t,[cos(t'),cos(2*t'),cos(3*t')],[1,2 3]);  
+            e=gce();
+            e.children(1).thickness=3;
+            e.children(2).line_style=4;
+            
+            hl=captions(e.children,['cos(t)';'cos(2*t)';'cos(3*t)']);
+            hl=captions(e.children,['cos(t)';'cos(2*t)';'cos(3*t)'],'in_upper_right');
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index d9271b8..64ebd29 100644 (file)
             the mouse and press the left button to release it.
         </para>
     </refsection>
-    <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            
-            t=linspace(0,%pi,20);
-            a=gca();
-            a.data_bounds=[t(1) -1.8;t($) 1.8];
-            
-            plot2d(t,[cos(t'),cos(2*t'),cos(3*t')],[-5,2 3]);  
-            e=gce();
-            e1=e.children(1);
-            e1.thickness=2;
-            e1.polyline_style=4;
-            e1.arrow_size_factor = 1/2;
-            e.children(2).line_style=4;
-            e3=e.children(3);
-            e3.line_mode='on';
-            e3.mark_background=5;
-            
-            hl=legend(['cos(t)';'cos(2*t)';'cos(3*t)']);
-        </scilab:image>
-    </refsection>
+    
     <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
@@ -199,6 +178,26 @@ e3.mark_background=5;
 
 hl=legend(['cos(t)';'cos(2*t)';'cos(3*t)']);
  ]]></programlisting>
+        <scilab:image>
+            
+            t=linspace(0,%pi,20);
+            a=gca();
+            a.data_bounds=[t(1) -1.8;t($) 1.8];
+            
+            plot2d(t,[cos(t'),cos(2*t'),cos(3*t')],[-5,2 3]);  
+            e=gce();
+            e1=e.children(1);
+            e1.thickness=2;
+            e1.polyline_style=4;
+            e1.arrow_size_factor = 1/2;
+            e.children(2).line_style=4;
+            e3=e.children(3);
+            e3.line_mode='on';
+            e3.mark_background=5;
+            
+            hl=legend(['cos(t)';'cos(2*t)';'cos(3*t)']);
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index d75608c..6d00ea3 100644 (file)
     </refsection>
     <refsection>
         <title>Sample</title>
-        <scilab:image>
-            subplot(221)
-            t=0:0.1:2*%pi;
-            plot2d(t,[cos(t'),cos(2*t'),cos(3*t')],[-1,2 3]);  
-            legends(['cos(t)';'cos(2*t)';'cos(3*t)'],[-1,2 3], opt=3 )
-            
-            subplot(222)
-            xset("line style",2);plot2d(t,cos(t),style=5);
-            xset("line style",4);plot2d(t,sin(t),style=3);
-            legends(["sin(t)";"cos(t)"],[[5;2],[3;4]], with_box=%f, opt=6 )
-            
-            subplot(223)
-            xset("line style",2);plot2d(t,cos(t),style=5);
-            xset("line style",4);plot2d(t,sin(t),style=3);
-            legends(["sin(t)";"cos(t)"],[[5;2],[3;4]], with_box=%f, opt=1, font_size=2 )
-            
-            subplot(224)
-            t=0:0.1:2*%pi;
-            plot2d(t,[cos(t'),cos(2*t'),cos(3*t')],[-1,2 3]);  
-            legends(['cos(t)';'cos(2*t)';'cos(3*t)'],[-1,2 3], opt=2, font_size=1 )
-        </scilab:image>
     </refsection>
     <refsection>
         <title>Examples</title>
 t=0:0.1:2*%pi;
 plot2d(t,[cos(t'),cos(2*t'),cos(3*t')],[-1,2 3]);  
 legends(['cos(t)';'cos(2*t)';'cos(3*t)'],[-1,2 3],opt="lr")
-
-scf() ;
+ ]]></programlisting>
+        <scilab:image>
+            // Example 1
+            t=0:0.1:2*%pi;
+            plot2d(t,[cos(t'),cos(2*t'),cos(3*t')],[-1,2 3]);  
+            legends(['cos(t)';'cos(2*t)';'cos(3*t)'],[-1,2 3],opt="lr")
+            
+        </scilab:image>
+        <programlisting role="example"><![CDATA[ 
+t=0:0.1:2*%pi;
 xset("line style",2);plot2d(t,cos(t),style=5);
 xset("line style",4);plot2d(t,sin(t),style=3);
 legends(["sin(t)";"cos(t)"],[[5;2],[3;4]], with_box=%f, opt="?")
@@ -186,6 +173,28 @@ t=0:0.1:2*%pi;
 plot2d(t,[cos(t'),cos(2*t'),cos(3*t')],[-1,2 3]);  
 legends(['cos(t)';'cos(2*t)';'cos(3*t)'],[-1,2 3], opt=2, font_size=1 )
  ]]></programlisting>
+        <scilab:image>
+            subplot(221)
+            t=0:0.1:2*%pi;
+            plot2d(t,[cos(t'),cos(2*t'),cos(3*t')],[-1,2 3]);  
+            legends(['cos(t)';'cos(2*t)';'cos(3*t)'],[-1,2 3], opt=3 )
+            
+            subplot(222)
+            xset("line style",2);plot2d(t,cos(t),style=5);
+            xset("line style",4);plot2d(t,sin(t),style=3);
+            legends(["sin(t)";"cos(t)"],[[5;2],[3;4]], with_box=%f, opt=6 )
+            
+            subplot(223)
+            xset("line style",2);plot2d(t,cos(t),style=5);
+            xset("line style",4);plot2d(t,sin(t),style=3);
+            legends(["sin(t)";"cos(t)"],[[5;2],[3;4]], with_box=%f, opt=1, font_size=2 )
+            
+            subplot(224)
+            t=0:0.1:2*%pi;
+            plot2d(t,[cos(t'),cos(2*t'),cos(3*t')],[-1,2 3]);  
+            legends(['cos(t)';'cos(2*t)';'cos(3*t)'],[-1,2 3], opt=2, font_size=1 )
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 5a7682e..c2dd0c5 100644 (file)
         </variablelist>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            title('my title','color','blue','edgecolor','red','fontsize',3,'rotation',90,'position',[0.3 0.8]);
-            
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 // display a title with several properties 
@@ -137,6 +130,11 @@ title('my title','rotation',90);
 // We can do all these modifications with just the below instruction:
 title('my title','color','blue','edgecolor','red','fontsize',3,'rotation',90,'position',[0.3 0.8]);
  ]]></programlisting>
+        <scilab:image>
+            title('my title','color','blue','edgecolor','red','fontsize',3,'rotation',90,'position',[0.3 0.8]);
+            
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index dcd029a..4651382 100644 (file)
             plot.
         </para>
     </refsection>
-    <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            xlabel(["first line";"second line"])
-            ylabel("A label on y axis", "fontsize", 6)
-        </scilab:image>
-    </refsection>
+    
     <refsection>
         <title>Examples</title>
         <programlisting role="example">xlabel(["first line";"second line"])
             ylabel("A label on y axis", "fontsize", 6)
         </programlisting>
+        <scilab:image>
+            xlabel(["first line";"second line"])
+            ylabel("A label on y axis", "fontsize", 6)
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index faed2f1..a722e1e 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            plot3d() ;
-            xtitle( 'My surface is blue', 'X axis', 'Y axis', 'Z axis' ) ;
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 plot3d() ;
@@ -89,6 +82,11 @@ mathml="<mrow>      <mfrac>        <mrow>          <mi>d</mi>          <mi>y</mi
 
 xtitle( 'My surface is blue', 'X axis', '$Y axis$', mathml );
  ]]></programlisting>
+        <scilab:image>
+            plot3d() ;
+            xtitle( 'My surface is blue', 'X axis', 'Y axis', 'Z axis' ) ;
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index b04260e..9b77eab 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            
-            clf()
-            a1=newaxes(); 
-            a1.axes_bounds=[0,0,1.0,0.5];
-            t=0:0.1:20;
-            plot(t,acosh(t),'r')
-            a2=newaxes();
-            a2.axes_bounds=[0,0.5,1.0,0.5];
-            x=0:0.1:4;
-            plot(x,sinh(x))
-            sca(a1);
-            plot(t,asinh(t),'g')
-            legend(['acosh','asinh'])
-            sca(a2); 
-            legend('sinh')
-            
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 clf()
@@ -79,6 +58,25 @@ legend(['acosh','asinh'])
 sca(a2); //make second axes current
 legend('sinh')
  ]]></programlisting>
+        <scilab:image>
+            
+            clf()
+            a1=newaxes(); 
+            a1.axes_bounds=[0,0,1.0,0.5];
+            t=0:0.1:20;
+            plot(t,acosh(t),'r')
+            a2=newaxes();
+            a2.axes_bounds=[0,0.5,1.0,0.5];
+            x=0:0.1:4;
+            plot(x,sinh(x))
+            sca(a1);
+            plot(t,asinh(t),'g')
+            legend(['acosh','asinh'])
+            sca(a2); 
+            legend('sinh')
+            
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 0c5c1c7..014d320 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            subplot(221)
-            plot2d()
-            subplot(222)
-            plot3d()
-            subplot(2,2,3)
-            param3d()
-            subplot(2,2,4)
-            hist3d()
-            
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 subplot(221)
@@ -76,6 +62,17 @@ param3d()
 subplot(2,2,4)
 hist3d()
  ]]></programlisting>
+        <scilab:image>
+            subplot(221)
+            plot2d()
+            subplot(222)
+            plot3d()
+            subplot(2,2,3)
+            param3d()
+            subplot(2,2,4)
+            hist3d()
+            
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 3fc9b89..5da7cc1 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            plot2d(1:10,1:10,1,"020")
-            drawaxis(x=2:7,y=4,dir='u',tics='v')
-            drawaxis(x=2:7,dir='u',tics='v') 
-            drawaxis(x=2:7,dir='d',tics='v') 
-            
-            drawaxis(x=[2,7,3],y=4,dir='d',tics='r') 
-            
-            drawaxis(x=4,y=2:7,dir='r',tics='v')
-            drawaxis(x=2,y=[2,7,3],dir='l',tics='r')
-            drawaxis(y=2:7,dir='r',tics='v')
-            drawaxis(y=2:7,dir='l',tics='v')
-            
-            drawaxis(x=2:7,y=8,dir='u',tics='v',val='A'+string(1:6));
-            drawaxis(x=8,y=2:7,dir='r',tics='v',val='B'+string(1:6));
-            
-            drawaxis(x=[2,5,0,3],y=9,dir='u',tics='i');
-            drawaxis(x=9,y=[2,5,0,3],dir='r',tics='i',sub_int=5);
-            
-            drawaxis(x=2:7,y=4,dir='u',tics='v',fontsize=10,textcolor=9,ticscolor=7,seg=0,sub_int=20) 
-            
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 plot2d(1:10,1:10,1,"020")
@@ -196,6 +171,28 @@ drawaxis(x=9,y=[2,5,0,3],dir='r',tics='i',sub_int=5);
 // horizontal axis again 
 drawaxis(x=2:7,y=4,dir='u',tics='v',fontsize=10,textcolor=9,ticscolor=7,seg=0,sub_int=20) 
  ]]></programlisting>
+        <scilab:image>
+            plot2d(1:10,1:10,1,"020")
+            drawaxis(x=2:7,y=4,dir='u',tics='v')
+            drawaxis(x=2:7,dir='u',tics='v') 
+            drawaxis(x=2:7,dir='d',tics='v') 
+            
+            drawaxis(x=[2,7,3],y=4,dir='d',tics='r') 
+            
+            drawaxis(x=4,y=2:7,dir='r',tics='v')
+            drawaxis(x=2,y=[2,7,3],dir='l',tics='r')
+            drawaxis(y=2:7,dir='r',tics='v')
+            drawaxis(y=2:7,dir='l',tics='v')
+            
+            drawaxis(x=2:7,y=8,dir='u',tics='v',val='A'+string(1:6));
+            drawaxis(x=8,y=2:7,dir='r',tics='v',val='B'+string(1:6));
+            
+            drawaxis(x=[2,5,0,3],y=9,dir='u',tics='i');
+            drawaxis(x=9,y=[2,5,0,3],dir='r',tics='i',sub_int=5);
+            
+            drawaxis(x=2:7,y=4,dir='u',tics='v',fontsize=10,textcolor=9,ticscolor=7,seg=0,sub_int=20) 
+            
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 77a8f7a..99b356d 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            x=[1 2 5];
-            y=[1 4 7;2 5 8;3 6  9];
-            bar(x,y,'stacked');
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 // First example: draw a bar (i.e a polyline with polyline_style type =6) with
@@ -129,6 +121,10 @@ scf(0);
 y=[1 -3 5];
 bar(y,0.5,'yellow');
  ]]></programlisting>
+        <scilab:image>
+            y=[1 -3 5];
+            bar(y,0.5,'yellow');
+        </scilab:image>
         <programlisting role="example"><![CDATA[ 
 
 // Second example: draw 3 bars (i.e 3 polylines with polyline_style type =6),default style='grouped'
@@ -137,6 +133,11 @@ x=[1 2 5];
 y=[1  -5 6;3 -2 7;4  -3 8];
 bar(x,y);
  ]]></programlisting>
+        <scilab:image>
+            x=[1 2 5];
+            y=[1  -5 6;3 -2 7;4  -3 8];
+            bar(x,y);
+        </scilab:image>
         <programlisting role="example"><![CDATA[ 
 // Third example : style='stacked'.
 scf(2);
@@ -144,6 +145,11 @@ x=[1 2 5];
 y=[1 4 7;2 5 8;3 6  9];
 bar(x,y,'stacked');
  ]]></programlisting>
+        <scilab:image>
+            x=[1 2 5];
+            y=[1 4 7;2 5 8;3 6  9];
+            bar(x,y,'stacked');
+        </scilab:image>
         <programlisting role="example"><![CDATA[ 
 // Fourth example: width=0.2;color='green'; default style='grouped'
 scf(3);
@@ -151,6 +157,11 @@ x=[1 2 5];
 y=[1 4 7;2 5 8;3 6 9];
 bar(x,y,0.2,'green');
  ]]></programlisting>
+        <scilab:image>
+            x=[1 2 5];
+            y=[1 4 7;2 5 8;3 6 9];
+            bar(x,y,0.2,'green');
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 75610e1..9f8fb5c 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            x=[1 2 5];
-            y=[1  -5 6;3 -2 7;4  -3 8];
-            barh(x,y);
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 // First example: draw a bar (i.e a polyline with polyline_style type =6),default style='grouped', width=0.5, color='yellow', default x=1:length(y)
@@ -128,6 +120,10 @@ scf(0);
 y=[1 -3 5];
 barh(y,0.5,'yellow');
  ]]></programlisting>
+        <scilab:image>
+            y=[1 -3 5];
+            barh(y,0.5,'yellow');
+        </scilab:image>
         <programlisting role="example"><![CDATA[ 
 // Second example: draw 3 bars (i.e 3 polylines with polyline_style type =6),default style='grouped'
 scf(1);
@@ -135,6 +131,11 @@ x=[1 2 5];
 y=[1  -5 6;3 -2 7;4  -3 8];
 barh(x,y);
  ]]></programlisting>
+        <scilab:image>
+            x=[1 2 5];
+            y=[1  -5 6;3 -2 7;4  -3 8];
+            barh(x,y);
+        </scilab:image>
         <programlisting role="example"><![CDATA[ 
 // Third example : style='stacked'.
 scf(2);
@@ -142,6 +143,11 @@ x=[1 2 5];
 y=[1 4 7;2 5 8;3 6  9];
 barh(x,y,'stacked');
  ]]></programlisting>
+        <scilab:image>
+            x=[1 2 5];
+            y=[1 4 7;2 5 8;3 6  9];
+            barh(x,y,'stacked');
+        </scilab:image>
         <programlisting role="example"><![CDATA[ 
 // Fourth example: width=0.2;color='green'; default style='grouped'
 scf(3);
@@ -149,6 +155,11 @@ x=[1 2 5];
 y=[1 4 7;2 5 8;3 6 9];
 barh(x,y,0.2,'green');
  ]]></programlisting>
+        <scilab:image>
+            x=[1 2 5];
+            y=[1 4 7;2 5 8;3 6 9];
+            barh(x,y,0.2,'green');
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 11a9712..83d584d 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            subplot(2,3,1)
-            xtitle('ex1: creation of 1 yellow bar and 3 bars')
-            x=1:3;
-            y1=1:3;
-            y2=[4 3 5;6 7 8;9 10 11];
-            bar(x,y1,'yellow');bar(x,y2);
-            
-            subplot(2,3,2) 
-            xtitle('grouped homogenisation')
-            x=1:3;
-            y1=1:3;
-            y2=[4 3 5;6 7 8;9 10 11];
-            bar(x,y1,'yellow');bar(x,y2);
-            barhomogenize();
-            
-            subplot(2,3,3)
-            xtitle('stacked homogenisation')
-            x=1:3; y1=1:3; y2=[4 3 5;6 7 8;9 10 11];
-            bar(x,y1,'yellow');bar(x,y2);
-            barhomogenize('stacked',1);
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 // First example: creation of 1 yellow bar (i.e 1 polyline with polyline_style=6) and 3 bars (i.e 3 polylines with polyline_style=6) 
@@ -123,7 +98,31 @@ xtitle('stacked homogenisation')
 x=1:3; y1=1:3; y2=[4 3 5;6 7 8;9 10 11];
 bar(x,y1,'yellow');bar(x,y2);
 barhomogenize('stacked',1);
-
+]]></programlisting>
+        <scilab:image>
+            subplot(2,3,1)
+            xtitle('ex1: creation of 1 yellow bar and 3 bars')
+            x=1:3;
+            y1=1:3;
+            y2=[4 3 5;6 7 8;9 10 11];
+            bar(x,y1,'yellow');bar(x,y2);
+            
+            subplot(2,3,2) 
+            xtitle('grouped homogenisation')
+            x=1:3;
+            y1=1:3;
+            y2=[4 3 5;6 7 8;9 10 11];
+            bar(x,y1,'yellow');bar(x,y2);
+            barhomogenize();
+            
+            subplot(2,3,3)
+            xtitle('stacked homogenisation')
+            x=1:3; y1=1:3; y2=[4 3 5;6 7 8;9 10 11];
+            bar(x,y1,'yellow');bar(x,y2);
+            barhomogenize('stacked',1);
+        </scilab:image>
+        
+        <programlisting role="example"><![CDATA[ 
 // Second example : creation of 1 red bar (i.e 1 polyline with polyline_style=6) and 2 polylines with type=1 (calling plot function)
 subplot(2,3,4)
 xtitle('ex2: creation of 1 bar and 2 polylines')
@@ -164,6 +163,47 @@ barhomogenize();
 //barhomogenize('stacked',0.5);
 //barhomogenize('stacked',1);
  ]]></programlisting>
+        <scilab:image>
+            // Second example : creation of 1 red bar (i.e 1 polyline with polyline_style=6) and 2 polylines with type=1 (calling plot function)
+            subplot(2,3,4)
+            xtitle('ex2: creation of 1 bar and 2 polylines')
+            x=1:10;
+            y=sin(x)/2;
+            bar(x,y,'red')
+            x1=1:10;
+            y1=[sin(x);cos(x)]
+            plot(x1,y1)
+            
+            // modify the polyline_style type of the second polyline from plot (this polyline becomes a bar)
+            subplot(2,3,5)
+            xtitle('transformation of the second polyline to bar')
+            x=1:10; 
+            y=sin(x)/2;
+            bar(x,y,'red')
+            x1=1:10;
+            y1=[sin(x);cos(x)]
+            plot(x1,y1)
+            e=gce();
+            e2=e.children(2);
+            e2.polyline_style=6;
+            
+            // homogenisation of the first bar (from bar function) and second bar (from the modification). 
+            subplot(2,3,6)
+            xtitle('grouped homogenisation')
+            x=1:10; 
+            y=sin(x)/2;
+            bar(x,y,'red')
+            x1=1:10;
+            y1=[sin(x);cos(x)]
+            plot(x1,y1)
+            e=gce();
+            e2=e.children(2);
+            e2.polyline_style=6;
+            barhomogenize();
+            // change the style and the width
+            //barhomogenize('stacked',0.5);
+            //barhomogenize('stacked',1);
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 09e8e49..a854b20 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image> 
-            plot3d();
-            h = gcf();
-            h.color_map = jetcolormap(16);
-            addcolor(name2rgb('grey')/255);
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 plot3d();
@@ -70,6 +61,13 @@ h = gcf();
 h.color_map = jetcolormap(16);
 addcolor(name2rgb('grey')/255);
  ]]></programlisting>
+        <scilab:image> 
+            plot3d();
+            h = gcf();
+            h.color_map = jetcolormap(16);
+            addcolor(name2rgb('grey')/255);
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 77dc2e1..e3ffc4d 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image> 
-            f = scf();
-            plot3d1();
-            f.color_map = autumncolormap(32);
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 f = scf();
 plot3d1();
 f.color_map = autumncolormap(32);
  ]]></programlisting>
+        <scilab:image> 
+            f = scf();
+            plot3d1();
+            f.color_map = autumncolormap(32);
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index fda4ea1..4507f0b 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image> 
-            f = scf();
-            plot3d1();
-            f.color_map = bonecolormap(32);
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 f = scf();
 plot3d1();
 f.color_map = bonecolormap(32);
  ]]></programlisting>
+        <scilab:image> 
+            f = scf();
+            plot3d1();
+            f.color_map = bonecolormap(32);
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 62c9695..fbfc0c5 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            x=linspace(-2*%pi,2*%pi,100)';
-            // using existing colors
-            plot2d(x,[sin(x),cos(x)],style=[color("red"),color("green")]);
-            // new colors: there are added to the colormap
-            e=gce(); p1=e.children(1); p2=e.children(2);
-            p1.foreground=color("purple"); p2.foreground=color("navy blue");
-            // using RGV values
-            p1.foreground=color(255,128,128);
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[
 x=linspace(-2*%pi,2*%pi,100)';
@@ -94,6 +81,16 @@ p1.foreground=color("purple"); p2.foreground=color("navy blue");
 // using RGV values
 p1.foreground=color(255,128,128);
  ]]></programlisting>
+        <scilab:image>
+            x=linspace(-2*%pi,2*%pi,100)';
+            // using existing colors
+            plot2d(x,[sin(x),cos(x)],style=[color("red"),color("green")]);
+            // new colors: there are added to the colormap
+            e=gce(); p1=e.children(1); p2=e.children(2);
+            p1.foreground=color("purple"); p2.foreground=color("navy blue");
+            // using RGV values
+            p1.foreground=color(255,128,128);
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 8d78bb4..c212bc5 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image localized="true"> 
-            // example 1
-            x = linspace(0,1,81);
-            z = cos(2*%pi*x)'*sin(2*%pi*x);
-            zm = min(z); zM = max(z);
-            clf()
-            xset("colormap",jetcolormap(64))
-            colorbar(zm,zM)
-            Sgrayplot(x,x,z)
-            xtitle("The function cos(2 pi x)sin(2 pi y)")
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 // example 1
@@ -89,6 +75,17 @@ colorbar(zm,zM)
 Sgrayplot(x,x,z)
 xtitle("The function cos(2 pi x)sin(2 pi y)")
  ]]></programlisting>
+        <scilab:image localized="true"> 
+            // example 1
+            x = linspace(0,1,81);
+            z = cos(2*%pi*x)'*sin(2*%pi*x);
+            zm = min(z); zM = max(z);
+            clf()
+            xset("colormap",jetcolormap(64))
+            colorbar(zm,zM)
+            Sgrayplot(x,x,z)
+            xtitle("The function cos(2 pi x)sin(2 pi y)")
+        </scilab:image>
         <programlisting role="example"><![CDATA[ 
 // example 2 
 x = linspace(0,1,81);
index c04e831..27228f0 100644 (file)
@@ -53,6 +53,17 @@ f=gcf(); f.color_map=cmap;
 plot3d1()
 f.color_map=get(sdf(),"color_map");
  ]]></programlisting>
+        <scilab:image> 
+            n=64;
+            r=linspace(0,1,n)';
+            g=linspace(1,0,n)';
+            b=ones(r);
+            cmap=[r g b];
+            f=gcf(); f.color_map=cmap;
+            plot3d1()
+            f.color_map=get(sdf(),"color_map");
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
@@ -110,17 +121,4 @@ f.color_map=get(sdf(),"color_map");
             </member>
         </simplelist>
     </refsection>
-    <refsection>
-        <title>Sample</title>
-        <scilab:image> 
-            n=64;
-            r=linspace(0,1,n)';
-            g=linspace(1,0,n)';
-            b=ones(r);
-            cmap=[r g b];
-            f=gcf(); f.color_map=cmap;
-            plot3d1()
-            f.color_map=get(sdf(),"color_map");
-        </scilab:image>
-    </refsection>
 </refentry>
index a3e354e..9c41f6a 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image> 
-            f = scf();
-            plot3d1();
-            f.color_map = coolcolormap(32);
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 f = scf();
 plot3d1();
 f.color_map = coolcolormap(32);
  ]]></programlisting>
+        <scilab:image> 
+            f = scf();
+            plot3d1();
+            f.color_map = coolcolormap(32);
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index ceb8e46..4775e70 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image> 
-            f = scf();
-            plot3d1();
-            f.color_map = coppercolormap(32);
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 f = scf();
 plot3d1();
 f.color_map = coppercolormap(32);
  ]]></programlisting>
+        <scilab:image> 
+            f = scf();
+            plot3d1();
+            f.color_map = coppercolormap(32);
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 18dc331..2f54c52 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image> 
-            f = scf();
-            plot3d1();
-            f.color_map = graycolormap(32);
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 f = scf();
 plot3d1();
 f.color_map = graycolormap(32);
  ]]></programlisting>
+        <scilab:image> 
+            f = scf();
+            plot3d1();
+            f.color_map = graycolormap(32);
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 1f631a9..888d4c2 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image> 
-            f = scf();
-            plot3d1();
-            f.color_map = hotcolormap(32);
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 f = scf();
 plot3d1();
 f.color_map = hotcolormap(32);
  ]]></programlisting>
+        <scilab:image> 
+            f = scf();
+            plot3d1();
+            f.color_map = hotcolormap(32);
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 7d7fd4a..04d6709 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image> 
-            t=[0:0.3:2*%pi]'; z=sin(t)*cos(t'); 
-            plot3d1(t,t,z) 
-            f=gcf();f.pixmap='on';
-            for h=0:0.1:1
-            hsv=[h*ones(32,1) linspace(0,1,32)' 0.7*ones(32,1)];
-            f.color_map=hsv2rgb(hsv);
-            xpause(10000)
-            end
-            for v=0:0.1:1
-            hsv=[ones(32,1) linspace(0,1,32)' v*ones(32,1)];
-            f.color_map=hsv2rgb(hsv);
-            xpause(10000)
-            end
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 t=[0:0.3:2*%pi]'; z=sin(t)*cos(t'); 
@@ -131,5 +113,19 @@ for v=0:0.1:1
   xpause(10000)
 end
  ]]></programlisting>
+        <scilab:image> 
+            t=[0:0.3:2*%pi]'; z=sin(t)*cos(t'); 
+            plot3d1(t,t,z) 
+            f=gcf();f.pixmap='on';
+            for h=0:0.1:1
+            hsv=[h*ones(32,1) linspace(0,1,32)' 0.7*ones(32,1)];
+            f.color_map=hsv2rgb(hsv);
+            end
+            for v=0:0.1:1
+            hsv=[ones(32,1) linspace(0,1,32)' v*ones(32,1)];
+            f.color_map=hsv2rgb(hsv);
+            end
+        </scilab:image>
+        
     </refsection>
 </refentry>
index 2a588ca..14ec4d8 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image> 
-            t=[0:0.1:2*%pi]'; z=sin(t)*cos(t'); 
-            f=gcf();f.color_map=hsvcolormap(64);
-            plot3d1(t,t,z,35,45,"X@Y@Z",[-2,2,2])
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 t=[0:0.1:2*%pi]'; z=sin(t)*cos(t'); 
 f=gcf();f.color_map=hsvcolormap(64);
 plot3d1(t,t,z,35,45,"X@Y@Z",[-2,2,2])
  ]]></programlisting>
+        <scilab:image> 
+            t=[0:0.1:2*%pi]'; z=sin(t)*cos(t'); 
+            f=gcf();f.color_map=hsvcolormap(64);
+            plot3d1(t,t,z,35,45,"X@Y@Z",[-2,2,2])
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index fbd53d6..184fa29 100644 (file)
             varying from blue, lightblue, green, yellow, orange then red
         </para>
     </refsection>
-    <refsection>
-        <title>Sample</title>
-        <scilab:image> 
-            f = scf();
-            plot3d1();
-            f.color_map = jetcolormap(32);
-        </scilab:image>
-    </refsection>
+    
     <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
@@ -60,6 +53,11 @@ f = scf();
 plot3d1();
 f.color_map = jetcolormap(32);
  ]]></programlisting>
+        <scilab:image> 
+            f = scf();
+            plot3d1();
+            f.color_map = jetcolormap(32);
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 70369ec..807c54b 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image> 
-            f = scf();
-            plot3d1();
-            f.color_map = oceancolormap(32);
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 f = scf();
 plot3d1();
 f.color_map = oceancolormap(32);
  ]]></programlisting>
+        <scilab:image> 
+            f = scf();
+            plot3d1();
+            f.color_map = oceancolormap(32);
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index e1dba42..b4a3b10 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image> 
-            f = scf();
-            plot3d1();
-            f.color_map = pinkcolormap(32);
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 f = scf();
 plot3d1();
 f.color_map = pinkcolormap(32);
  ]]></programlisting>
+        <scilab:image> 
+            f = scf();
+            plot3d1();
+            f.color_map = pinkcolormap(32);
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 4ff8353..e4f540e 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image> 
-            f = scf();
-            plot3d1();
-            f.color_map = rainbowcolormap(32);
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 f = scf();
 plot3d1();
 f.color_map = rainbowcolormap(32);
  ]]></programlisting>
+        <scilab:image> 
+            f = scf();
+            plot3d1();
+            f.color_map = rainbowcolormap(32);
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index d44efbb..48310d4 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image> 
-            f = scf();
-            plot3d1();
-            f.color_map = springcolormap(32);
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 f = scf();
 plot3d1();
 f.color_map = springcolormap(32);
  ]]></programlisting>
+        <scilab:image> 
+            f = scf();
+            plot3d1();
+            f.color_map = springcolormap(32);
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index f005b3e..d5bd389 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image> 
-            f = scf();
-            plot3d1();
-            f.color_map = summercolormap(32);
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 f = scf();
 plot3d1();
 f.color_map = summercolormap(32);
  ]]></programlisting>
+        <scilab:image> 
+            f = scf();
+            plot3d1();
+            f.color_map = summercolormap(32);
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index b7a3248..df79c13 100644 (file)
         <para>This colormap is completely white</para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image> 
-            f = scf();
-            plot3d1();
-            f.color_map = whitecolormap(32);
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 f = scf();
 plot3d1();
 f.color_map = whitecolormap(32);
  ]]></programlisting>
+        <scilab:image> 
+            f = scf();
+            plot3d1();
+            f.color_map = whitecolormap(32);
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 581f3a5..7e48574 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image> 
-            f = scf();
-            plot3d1();
-            f.color_map = wintercolormap(32);
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 f = scf();
 plot3d1();
 f.color_map = wintercolormap(32);
  ]]></programlisting>
+        <scilab:image> 
+            f = scf();
+            plot3d1();
+            f.color_map = wintercolormap(32);
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index fac6fb6..0798a6d 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            plot2d(0,0,-1,"031"," ",[-2,-2,2,2])
-            xset("color",3)
-            xarc(-1,1,2,2,0,90*64)
-            xarc(-1.5,1.5,3,3,0,360*64)
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[
 // isoview scaling
@@ -66,6 +57,12 @@ xset("color",3)
 xarc(-1,1,2,2,0,90*64)
 xarc(-1.5,1.5,3,3,0,360*64)
  ]]></programlisting>
+        <scilab:image>
+            plot2d(0,0,-1,"031"," ",[-2,-2,2,2])
+            xset("color",3)
+            xarc(-1,1,2,2,0,90*64)
+            xarc(-1.5,1.5,3,3,0,360*64)
+        </scilab:image>
         
         <programlisting role="example"><![CDATA[
 
index 5c80283..574a5e2 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            plot2d(0,0,-1,"031"," ",[-1,-1,1,1])
-            arcs=[-1.0 0.0 0.5;
-            1.0 0.0 0.5;
-            0.5 1.0 0.5;
-            0.5 0.5 1.0;
-            0.0 0.0 0.0;
-            180*64 360*64 90*64];
-            xarcs(arcs,[1,2,3])
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 plot2d(0,0,-1,"031"," ",[-1,-1,1,1])
@@ -75,6 +62,17 @@ arcs=[-1.0 0.0 0.5; // upper left x
        180*64 360*64 90*64]; // angle 2
 xarcs(arcs,[1,2,3])
  ]]></programlisting>
+        <scilab:image>
+            plot2d(0,0,-1,"031"," ",[-1,-1,1,1])
+            arcs=[-1.0 0.0 0.5;
+            1.0 0.0 0.5;
+            0.5 1.0 0.5;
+            0.5 0.5 1.0;
+            0.0 0.0 0.0;
+            180*64 360*64 90*64];
+            xarcs(arcs,[1,2,3])
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 7ee11e1..cf40edd 100644 (file)
@@ -66,18 +66,6 @@ ny=[yi_1 y1_2 ...; yf_1 yf_2 ...]
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            x=2*%pi*(0:9)/8;
-            x1=[sin(x); 9*sin(x)];
-            y1=[cos(x); 9*cos(x)];
-            plot2d([-10,10], [-10,10], [-1,-1], "022")
-            xset("clipgrf")
-            xarrows(x1, y1, 1, 1:10)
-            xset("clipoff")
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 x=2*%pi*(0:9)/8;
@@ -88,5 +76,14 @@ xset("clipgrf")
 xarrows(x1, y1, 1, 1:10)
 xset("clipoff")
  ]]></programlisting>
+        <scilab:image>
+            x=2*%pi*(0:9)/8;
+            x1=[sin(x); 9*sin(x)];
+            y1=[cos(x); 9*cos(x)];
+            plot2d([-10,10], [-10,10], [-1,-1], "022")
+            xset("clipgrf")
+            xarrows(x1, y1, 1, 1:10)
+            xset("clipoff")
+        </scilab:image>
     </refsection>
 </refentry>
index 798ac03..fab13c2 100644 (file)
         <para>If a2 is equal to 360*64, a complete circle will be drawn.</para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            // isoview scaling 
-            plot2d(0,0,-1,"031"," ",[-2,-2,2,2])
-            xfarc(-0.5,0.5,1,1,0,90*64)
-            xset("color",2)
-            xfarc(0.5,0.5,1,1,0,360*64)
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 // isoview scaling 
@@ -68,6 +58,13 @@ xfarc(-0.5,0.5,1,1,0,90*64)
 xset("color",2)
 xfarc(0.5,0.5,1,1,0,360*64)
  ]]></programlisting>
+        <scilab:image>
+            // isoview scaling 
+            plot2d(0,0,-1,"031"," ",[-2,-2,2,2])
+            xfarc(-0.5,0.5,1,1,0,90*64)
+            xset("color",2)
+            xfarc(0.5,0.5,1,1,0,360*64)
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 46b5b78..f8b31cb 100644 (file)
         <para>If a2 is equal to 360*64, a complete circle will be drawn.</para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            plot2d(0,0,-1,"031"," ",[-1,-1,1,1])
-            arcs=[-1.0 0.0 0.5; 
-            1.0 0.0 0.5; 
-            0.5 1.0 0.5; 
-            0.5 0.5 1.0; 
-            0.0 0.0 0.0; 
-            180*64 360*64 90*64]; 
-            xfarcs(arcs,[1,2,3])
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 plot2d(0,0,-1,"031"," ",[-1,-1,1,1])
@@ -76,6 +63,17 @@ arcs=[-1.0 0.0 0.5; // upper left x
        180*64 360*64 90*64]; // angle 2
 xfarcs(arcs,[1,2,3])
  ]]></programlisting>
+        <scilab:image>
+            plot2d(0,0,-1,"031"," ",[-1,-1,1,1])
+            arcs=[-1.0 0.0 0.5; 
+            1.0 0.0 0.5; 
+            0.5 1.0 0.5; 
+            0.5 0.5 1.0; 
+            0.0 0.0 0.0; 
+            180*64 360*64 90*64]; 
+            xfarcs(arcs,[1,2,3])
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 034be25..e13d82b 100644 (file)
             (upper-left point, width, height) in user coordinates.
         </para>
     </refsection>
-    <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            plot2d(0,0,-1,"010"," ",[-2,-2,2,2])
-            xset("color",5)
-            xfrect(-1,1,2,2)
-        </scilab:image>
-    </refsection>
+    
     <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
@@ -54,6 +47,12 @@ plot2d(0,0,-1,"010"," ",[-2,-2,2,2])
 xset("color",5)
 xfrect(-1,1,2,2)
  ]]></programlisting>
+        <scilab:image>
+            plot2d(0,0,-1,"010"," ",[-2,-2,2,2])
+            xset("color",5)
+            xfrect(-1,1,2,2)
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index e93aa6e..f03f589 100644 (file)
         <para>WARNING: please note that height is positive downwards.</para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            plot2d(0,0,-1,"010"," ",[-2,-2,2,2])
-            xset("color",5)
-            xrect(-1,1,2,2)
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 plot2d(0,0,-1,"010"," ",[-2,-2,2,2])
 xset("color",5)
 xrect(-1,1,2,2)
  ]]></programlisting>
+        <scilab:image>
+            plot2d(0,0,-1,"010"," ",[-2,-2,2,2])
+            xset("color",5)
+            xrect(-1,1,2,2)
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 421ece9..57f1b9e 100644 (file)
         <para>WARNING: please note that height is positive downwards.</para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            plot2d([-100,500],[-50,50],[-1,-1],"022")
-            cols=[-34,-33,-32,-20:5:20,32,33,34];
-            x=400*(0:14)/14; step=20;
-            rects=[x;10*ones(x);step*ones(x);30*ones(x)];
-            xrects(rects,cols)
-            xnumb(x,15*ones(x),cols)
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 plot2d([-100,500],[-50,50],[-1,-1],"022")
@@ -82,6 +71,15 @@ rects=[x;10*ones(x);step*ones(x);30*ones(x)];
 xrects(rects,cols)
 xnumb(x,15*ones(x),cols)
  ]]></programlisting>
+        <scilab:image>
+            plot2d([-100,500],[-50,50],[-1,-1],"022")
+            cols=[-34,-33,-32,-20:5:20,32,33,34];
+            x=400*(0:14)/14; step=20;
+            rects=[x;10*ones(x);step*ones(x);30*ones(x)];
+            xrects(rects,cols)
+            xnumb(x,15*ones(x),cols)
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 94a9683..68f8d31 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            pie([3 4 6 2],[0 1 0 0],["part1","part2","part3","part4"]);
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 // First example : one input argument  x=[1 2 5]
@@ -98,6 +92,9 @@ pie([5 9 4 6 3],[0 1 0 1 0]);
 scf(2);
 pie([3 4 6 2],[0 1 0 0],["part1","part2","part3","part4"]);
  ]]></programlisting>
+        <scilab:image>
+            pie([3 4 6 2],[0 1 0 0],["part1","part2","part3","part4"]);
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 323d24d..5d614ad 100644 (file)
@@ -39,8 +39,7 @@
             <literal>sl</literal> (<literal>syslin</literal> list)
         </para>
     </refsection>
-    <!--  <refsection>
-    <title>Sample</title>
+    <!--  
     <scilab:image localized="true">
       s=poly(0,'s');
       n=[1+s   2+3*s+4*s^2        5; 0        1-s             s];
@@ -48,7 +47,7 @@
       h=syslin('c',n./d); 
       plzr(h);
     </scilab:image>
-  </refsection>-->
+-->
     <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
index 7c0b667..359158b 100644 (file)
         </variablelist>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            a=get("current_axes")
-            a.data_bounds=[-2,-2;2,2];
-            
-            xpoly(sin(2*%pi*(0:5)/5),cos(2*%pi*(0:5)/5),"lines",0)
-            p=get("hdl");
-            p.foreground=2;
-            p.thickness=3;
-            p.mark_style=9;
-            d=p.data;d(1,:)=[0 0];p.data=d;
-            a.rotation_angles=[0 45];
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 a=get("current_axes")//get the handle of the newly created axes
@@ -416,6 +401,19 @@ p.mark_mode="off";
 p.polyline_style=3;
 p.line_style=4;
  ]]></programlisting>
+        <scilab:image>
+            a=get("current_axes")
+            a.data_bounds=[-2,-2;2,2];
+            
+            xpoly(sin(2*%pi*(0:5)/5),cos(2*%pi*(0:5)/5),"lines",0)
+            p=get("hdl");
+            p.foreground=2;
+            p.thickness=3;
+            p.mark_style=9;
+            d=p.data;d(1,:)=[0 0];p.data=d;
+            a.rotation_angles=[0 45];
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 614f8d7..50ad1f5 100644 (file)
         </itemizedlist>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            x=sin(2*%pi*(0:4)/5);
-            y=cos(2*%pi*(0:4)/5);
-            plot2d(0,0,-1,"010"," ",[-2,-2,2,2]);
-            xset("color",5);
-            xfpoly(x,y);
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 x=sin(2*%pi*(0:4)/5);
@@ -98,6 +88,13 @@ delete(e);
 xfpoly(x,y,3);
 
  ]]></programlisting>
+        <scilab:image>
+            x=sin(2*%pi*(0:4)/5);
+            y=cos(2*%pi*(0:4)/5);
+            plot2d(0,0,-1,"010"," ",[-2,-2,2,2]);
+            xset("color",5);
+            xfpoly(x,y);
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index b538308..d0b082a 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            x=sin(2*%pi*(0:4)/5);
-            y=cos(2*%pi*(0:4)/5);
-            
-            plot2d(0,0,-1,"010"," ",[-2,-2,2,2])
-            xset("color",5)
-            xpoly(x,y,"lines",1) // by default closed
-            
-            e=gce(); // get the current entity (the last created: here the polyline)
-            e.closed = 'off' // the polyline is now open
-            
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
     x=sin(2*%pi*(0:4)/5);
     e=gce(); // get the current entity (the last created: here the polyline)
     e.closed = 'off' // the polyline is now open
     ]]></programlisting>
+        <scilab:image>
+            x=sin(2*%pi*(0:4)/5);
+            y=cos(2*%pi*(0:4)/5);
+            
+            plot2d(0,0,-1,"010"," ",[-2,-2,2,2])
+            xset("color",5)
+            xpoly(x,y,"lines",1) // by default closed
+            
+            e=gce(); // get the current entity (the last created: here the polyline)
+            e.closed = 'off' // the polyline is now open
+            
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 288bc52..6278d13 100644 (file)
         </itemizedlist>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            plot2d(0,0,-1,"012"," ",[0,0,1,1])
-            rand("uniform")
-            xset("color",3)
-            xpolys(rand(3,5),rand(3,5),[-1,-2,0,1,2])
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 plot2d(0,0,-1,"012"," ",[0,0,1,1])
@@ -76,6 +67,13 @@ rand("uniform")
 xset("color",3)
 xpolys(rand(3,5),rand(3,5),[-1,-2,0,1,2])
  ]]></programlisting>
+        <scilab:image>
+            plot2d(0,0,-1,"012"," ",[0,0,1,1])
+            rand("uniform")
+            xset("color",3)
+            xpolys(rand(3,5),rand(3,5),[-1,-2,0,1,2])
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 1890baa..c07b91e 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            plot2d(0,0,-1,"012"," ",[0,0,10,10])
-            xrpoly([5,5],5,5)
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 plot2d(0,0,-1,"012"," ",[0,0,10,10])
 xrpoly([5,5],5,5)
  ]]></programlisting>
+        <scilab:image>
+            plot2d(0,0,-1,"012"," ",[0,0,10,10])
+            xrpoly([5,5],5,5)
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 120b8df..32162de 100644 (file)
             character.
         </para>
     </refsection>
-    <!--  <refsection>
-    <title>Sample</title>
-    <scilab:image>
-      [fId,fSize]=getfont();
-      xset("font",fId,fSize)
-    </scilab:image>
-  </refsection>-->
     <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
@@ -87,6 +80,13 @@ xset("font",fId,fSize)
 plot2d(0,0,rect=[0 0 10 10],axesflag=0)
 xstring(5,5,"string")
  ]]></programlisting>
+        <!--  
+    <scilab:image>
+      [fId,fSize]=getfont();
+      xset("font",fId,fSize)
+    </scilab:image>
+-->
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index ff8ea7b..ac64b26 100644 (file)
         </para>
         <para>The result might not be very accurate with PostScript driver.</para>
     </refsection>
-    <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            axes = gca() ;
-            axes.axes_visible = 'on' ;
-            axes.data_bounds = [ 1, 1 ; 10, 10 ] ;
-            xtitle( 'stringbox', 'X', 'Y' )  ;
-            stringbox( axes.x_label )
-            str = [ "Scilab", "is" , "not", "Skylab" ] ;
-            xstring( 4, 9, str ) ;
-        </scilab:image>
-    </refsection>
+    
     <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
@@ -140,6 +129,16 @@ else
   disp('You missed it.')
 end;
  ]]></programlisting>
+        <scilab:image>
+            axes = gca() ;
+            axes.axes_visible = 'on' ;
+            axes.data_bounds = [ 1, 1 ; 10, 10 ] ;
+            xtitle( 'stringbox', 'X', 'Y' )  ;
+            stringbox( axes.x_label )
+            str = [ "Scilab", "is" , "not", "Skylab" ] ;
+            xstring( 4, 9, str ) ;
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 9b821f7..d72c009 100644 (file)
         </variablelist>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            a=get("current_axes");
-            a.data_bounds=[0,0;1,1];
-            a.axes_visible = 'on' ;
-            
-            xstring(0,0,"Scilab is not esilaB",0,0)
-            
-            t=get("hdl") 
-            
-            t.font_foreground=6; 
-            t.font_size=5;
-            t.font_style=5;
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 a=get("current_axes");
@@ -304,6 +288,19 @@ t.text=["SCILAB","can write LaTeX :","$\frac{abc}{xyz}$";"or","MathML :",mathml]
 
 
  ]]></programlisting>
+        <scilab:image>
+            a=get("current_axes");
+            a.data_bounds=[0,0;1,1];
+            a.axes_visible = 'on' ;
+            
+            xstring(0,0,"Scilab is not esilaB",0,0)
+            
+            t=get("hdl") 
+            
+            t.font_foreground=6; 
+            t.font_size=5;
+            t.font_style=5;
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 0315337..2c49c61 100644 (file)
             with a font as big as possible.
         </para>
     </refsection>
-    <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            titlepage("This is the title of the page");
-        </scilab:image>
-    </refsection>
+    
     <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 titlepage("This is the title of the page");
  ]]></programlisting>
+        <scilab:image>
+            titlepage("This is the title of the page");
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index a7d1d8a..2dd89f6 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            plot2d([0;1],[0;1],0)
-            xstring(0.5,0.5,["$\overbrace{Scilab}$" "n''est ";"pas" "$\underbrace{Matlab}$"])
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 plot2d([0;1],[0;1],0)
@@ -110,6 +103,11 @@ xstring(0.1,0.3,alphabet)
 xset("font",1,24);
 xstring(0.1,0.6,"a") //big alpha
  ]]></programlisting>
+        <scilab:image>
+            plot2d([0;1],[0;1],0)
+            xstring(0.5,0.5,["$\overbrace{Scilab}$" "n''est ";"pas" "$\underbrace{Matlab}$"])
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index e1c6c99..0c6a395 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            str=["Scilab" "is";"$\sqrt{not}$" "elisaB"]; // LaTeX rendering (&gt;= Scilab 5.2)
-            plot2d(0,0,[-1,1],"010"," ",[0,0,1,1]);
-            
-            r=[0,0,1,0.5];
-            xstringb(r(1),r(2),str,r(3),r(4),"fill");
-            xrect(r(1),r(2)+r(4),r(3),r(4));
-            
-            r=[r(1),r(2)+r(4)+0.01,r(3),r(4)/2];
-            xrect(r(1),r(2)+r(4),r(3),r(4))
-            xstringb(r(1),r(2),str,r(3),r(4),"fill");
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 str=["Scilab" "is";"$\sqrt{not}$" "elisaB"]; // LaTeX rendering (>= Scilab 5.2)
@@ -93,6 +78,19 @@ r=[r(1),r(2)+r(4)+0.01,r(3),r(4)/2];
 xrect(r(1),r(2)+r(4),r(3),r(4))
 xstringb(r(1),r(2),str,r(3),r(4),"fill");
  ]]></programlisting>
+        <scilab:image>
+            str=["Scilab" "is";"$\sqrt{not}$" "elisaB"]; // LaTeX rendering (&gt;= Scilab 5.2)
+            plot2d(0,0,[-1,1],"010"," ",[0,0,1,1]);
+            
+            r=[0,0,1,0.5];
+            xstringb(r(1),r(2),str,r(3),r(4),"fill");
+            xrect(r(1),r(2)+r(4),r(3),r(4));
+            
+            r=[r(1),r(2)+r(4)+0.01,r(3),r(4)/2];
+            xrect(r(1),r(2)+r(4),r(3),r(4))
+            xstringb(r(1),r(2),str,r(3),r(4),"fill");
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index edc9013..6d82212 100644 (file)
         <para>The result can be approximative when using the Postscript driver.</para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            plot2d([0;1],[0;1],0)
-            str=["$\underleftrightarrow{Scilab}$" "is";"not" "elisaB"]; // Only valid from Scilab 5.2
-            r=xstringl(0.5,0.5,str)
-            xrects([r(1) r(2)+r(4) r(3) r(4)]')
-            xstring(r(1),r(2),str)
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 plot2d([0;1],[0;1],0)
@@ -112,6 +102,14 @@ xstring(r2(1),r2(2),str)
 
 
  ]]></programlisting>
+        <scilab:image>
+            plot2d([0;1],[0;1],0)
+            str=["$\underleftrightarrow{Scilab}$" "is";"not" "elisaB"]; // Only valid from Scilab 5.2
+            r=xstringl(0.5,0.5,str)
+            xrects([r(1) r(2)+r(4) r(3) r(4)]')
+            xstring(r(1),r(2),str)
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 78bfad8..a8a4145 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            plot3d();
-            a=gca();
-            p=a.children(1);
-            t=[1,0,-1.25];
-            move(p,t);      
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[
 plot3d();
@@ -81,6 +71,14 @@ p=a.children(1);
 t=[1,0,-1.25];
 move(p,t);
  ]]></programlisting>
+        <scilab:image>
+            plot3d();
+            a=gca();
+            p=a.children(1);
+            t=[1,0,-1.25];
+            move(p,t);      
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index b3ee63f..ba3124d 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            xsetech([0,0,1,1],[-1,-1,1,1])
-            xy=[(0:0.1:10);sin(0:0.1:10)]/10;
-            for i=2*%pi*(0:10)/10,
-            [xy1]=rotate(xy,i);
-            xpoly(xy1(1,:),xy1(2,:),"lines")
-            end
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 xsetech([0,0,1,1],[-1,-1,1,1])
@@ -81,5 +70,14 @@ for i=2*%pi*(0:10)/10,
   xpoly(xy1(1,:),xy1(2,:),"lines")
 end
  ]]></programlisting>
+        <scilab:image>
+            xsetech([0,0,1,1],[-1,-1,1,1])
+            xy=[(0:0.1:10);sin(0:0.1:10)]/10;
+            for i=2*%pi*(0:10)/10,
+            [xy1]=rotate(xy,i);
+            xpoly(xy1(1,:),xy1(2,:),"lines")
+            end
+        </scilab:image>
+        
     </refsection>
 </refentry>
index 26ce665..f14ef2a 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            xsetech([0,0,1.0,0.5])
-            plot2d()
-            xsetech([0,0.5,1.0,0.5])
-            grayplot()
-            xsetech([0,0,1.0,0.5])
-            [wrect,frect,logflag,arect]=xgetech();
-            xsetech([0,0.5,1.0,0.5])
-            [wrect,frect,logflag,arect]=xgetech();
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 // first subwindow 
@@ -98,6 +85,17 @@ xsetech([0,0,1.0,0.5])
 xsetech([0,0.5,1.0,0.5])
 [wrect,frect,logflag,arect]=xgetech();
  ]]></programlisting>
+        <scilab:image>
+            xsetech([0,0,1.0,0.5])
+            plot2d()
+            xsetech([0,0.5,1.0,0.5])
+            grayplot()
+            xsetech([0,0,1.0,0.5])
+            [wrect,frect,logflag,arect]=xgetech();
+            xsetech([0,0.5,1.0,0.5])
+            [wrect,frect,logflag,arect]=xgetech();
+        </scilab:image>
+        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index ae44dbf..9bab527 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            x=[0:0.1:2*%pi]';
-            plot2d(sin(x))
-            xgrid(5)
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 x=[0:0.1:2*%pi]';
 plot2d(sin(x))
 xgrid(2)
  ]]></programlisting>
+        <scilab:image>
+            x=[0:0.1:2*%pi]';
+            plot2d(sin(x))
+            xgrid(5)
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 1cadf1e..68660d9 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            plot2d([-100,500],[-100,600],[-1,-1],"022")
-            x=0:100:200;
-            xnumb(x,500*ones(x),[10,20,35],1)
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 plot2d([-100,500],[-100,600],[-1,-1],"022")
 x=0:100:200;
 xnumb(x,500*ones(x),[10,20,35],1)
  ]]></programlisting>
+        <scilab:image>
+            plot2d([-100,500],[-100,600],[-1,-1],"022")
+            x=0:100:200;
+            xnumb(x,500*ones(x),[10,20,35],1)
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
index 4810c5e..dc77f1e 100644 (file)
@@ -76,24 +76,6 @@ zv=[zi_1 zi_2 ...; zf_1 zf_2...]
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            a=gca();
-            a.view="3d";
-            f=gcf();
-            f.color_map=rainbowcolormap(120);
-            alpha=2*%pi*(0:119)/40;
-            xv=[sin(alpha)/2;sin(alpha)/3];
-            yv=[cos(alpha)/2;cos(alpha)/3];
-            zv=[alpha/8;alpha/8];
-            xsegs(xv,yv,zv,1:120);
-            a.data_bounds = [min(xv) min(yv) min(zv); ...
-            max(xv) max(yv) max(zv)];
-            e = gce();
-            e.arrow_size = 0.4;
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[
 
@@ -104,6 +86,13 @@ yv=[cos(x);9*cos(x)];
 plot2d([-10,10],[-10,10],[-1,-1],"022")
 xsegs(xv,yv,1:10)
  ]]></programlisting>
+        <scilab:image>
+            x=2*%pi*(0:9)/10;
+            xv=[sin(x);9*sin(x)];
+            yv=[cos(x);9*cos(x)];
+            plot2d([-10,10],[-10,10],[-1,-1],"022")
+            xsegs(xv,yv,1:10)
+        </scilab:image>
         <programlisting role="example"><![CDATA[
 
 // 2D example
@@ -111,6 +100,11 @@ plot2d([-10,10],[-10,10],[-1,-1],"022")
 xsegs([9, -9],[9 , -9]) // Draw the line from X(9,9) to Y(-9, -9)
 xsegs([5, -2],[4 , -1]) // Draw the line from X(5,4) to Y(-2, -1)
  ]]></programlisting>
+        <scilab:image>
+            plot2d([-10,10],[-10,10],[-1,-1],"022")
+            xsegs([9, -9],[9 , -9]) // Draw the line from X(9,9) to Y(-9, -9)
+            xsegs([5, -2],[4 , -1]) // Draw the line from X(5,4) to Y(-2, -1)
+        </scilab:image>
         <programlisting role="example"><![CDATA[
 // 3D example
 clf();
@@ -131,5 +125,21 @@ e = gce();
 e.arrow_size = 0.4;
 
  ]]></programlisting>
+        <scilab:image>
+            a=gca();
+            a.view="3d";
+            f=gcf();
+            f.color_map=rainbowcolormap(120);
+            alpha=2*%pi*(0:119)/40;
+            xv=[sin(alpha)/2;sin(alpha)/3];
+            yv=[cos(alpha)/2;cos(alpha)/3];
+            zv=[alpha/8;alpha/8];
+            xsegs(xv,yv,zv,1:120);
+            a.data_bounds = [min(xv) min(yv) min(zv); ...
+            max(xv) max(yv) max(zv)];
+            e = gce();
+            e.arrow_size = 0.4;
+        </scilab:image>
+        
     </refsection>
 </refentry>
index a5d026e..7212d3f 100644 (file)
         </para>
     </refsection>
     <refsection>
-        <title>Sample</title>
-        <scilab:image>
-            xset("font",2,0)
-            xsetech([0,0,0.5,0.5]);
-            plot3d()
-            xsetech([0.5,0,0.5,0.5]);
-            plot2d()
-            xsetech([0.5,0.5,0.5,0.5]);
-            grayplot()
-            xsetech([0,0.5,0.5,0.5]);
-            histplot()
-            xsetech([0,0,1,1])
-        </scilab:image>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 // To get a graphical explanation of xsetech parameters enter:
@@ -135,18 +120,39 @@ histplot()
 // back to default values for the sub-window 
 xsetech([0,0,1,1])
  ]]></programlisting>
+        <scilab:image>
+            xset("font",2,0)
+            xsetech([0,0,0.5,0.5]);
+            plot3d()
+            xsetech([0.5,0,0.5,0.5]);
+            plot2d()
+            xsetech([0.5,0.5,0.5,0.5]);
+            grayplot()
+            xsetech([0,0.5,0.5,0.5]);
+            histplot()
+            xsetech([0,0,1,1])
+        </scilab:image>
+        
         <programlisting role="example"><![CDATA[ 
 // One plot with changed arect 
 clf()
 xsetech(arect=[0,0,0,0]) 
 x=1:0.1:10;plot2d(x',sin(x)')
  ]]></programlisting>
+        <scilab:image>
+            xsetech(arect=[0,0,0,0]) 
+            x=1:0.1:10;plot2d(x',sin(x)')
+        </scilab:image>
         <programlisting role="example"><![CDATA[ 
 clf()
 xsetech(arect=[1/8,1/8,1/16,1/4])
 x=1:0.1:10;plot2d(x',sin(x)')
 clf()
  ]]></programlisting>
+        <scilab:image>
+            xsetech(arect=[1/8,1/8,1/16,1/4])
+            x=1:0.1:10;plot2d(x',sin(x)')
+        </scilab:image>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>