New serie of images in the graphic help. 48/7748/3
Sylvestre Ledru [Sat, 30 Jun 2012 23:14:01 +0000 (01:14 +0200)]
For the color_management, I use directly all examples.

The script was the following:

function reuseExampleForImage(fileName)
disp(fileName)
doc = xmlRead(fileName);

xp = xmlXPath(doc, "//foo:refsection[foo:title=''Examples'']",["foo" "http://docbook.org/ns/docbook"]);
if (xp.size > 0)
Example=xp(1).children(2).content;
if length(Example)>0
    root = xmlElement(doc, "refsection");

    root.children(1) = "<title>Sample</title>";
    root.children(2) = xmlElement(doc, "scilab:image");
    root.children(2).content = Example;
    xmlDump(root);

doc.root.children(4.9)=root;
xmlWrite(doc);
end
end
xmlDelete(doc);
endfunction

listHelp=mgetl("helpfile.txt");

for i = 1 : size(listHelp,'*')
  reuseExampleForImage(listHelp(i));
end

Quick and dirty!!

Change-Id: I77fe67e3bec45ceef5af784d383a626441a3231d

44 files changed:
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/champ_properties.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/graduate.xml
scilab/modules/graphics/help/en_US/axes_operations/isoview.xml
scilab/modules/graphics/help/en_US/axes_operations/replot.xml
scilab/modules/graphics/help/en_US/axes_operations/sca.xml
scilab/modules/graphics/help/en_US/axes_operations/sda.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/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/color_list.xml
scilab/modules/graphics/help/en_US/color_management/colorbar.xml
scilab/modules/graphics/help/en_US/color_management/colordef.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/getcolor.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/name2rgb.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/rgb2name.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/polygon/xpoly.xml
scilab/modules/graphics/help/en_US/transform/move.xml
scilab/modules/graphics/help/en_US/transform/rotate.xml

index 9db268b..edaf676 100644 (file)
@@ -10,7 +10,7 @@
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="champ">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="champ">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
index 0565abe..d6190bc 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="champ1">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="champ1">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
index 3d48d67..f539ac3 100644 (file)
@@ -10,7 +10,7 @@
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="champ_properties">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="champ_properties">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
index a053f4e..42fbd82 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;
index 2572dde..10d15c0 100644 (file)
     </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[ 
 t=linspace(0,%pi,20);
-a=gca();a.data_bounds=[t(1) -1.8;t($) 1.8];
+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;
+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;
+e3=e.children(3);
+e3.line_mode='on';
+e3.mark_background=5;
 
 hl=legend(['cos(t)';'cos(2*t)';'cos(3*t)']);
  ]]></programlisting>
index 6791b42..5ad3fb1 100644 (file)
     </para>
   </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>
     <programlisting role="example"><![CDATA[ 
 // Example 1
@@ -141,7 +166,8 @@ scf() ;
 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="?")
-
+ ]]></programlisting>
+    <programlisting role="example"><![CDATA[ 
 // Example 2
 scf() ;
 subplot(221)
index 03acb5e..ce5e9cb 100644 (file)
       </varlistentry>
     </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[ 
index e9fb64f..cb541a2 100644 (file)
     </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)
index 2d51b28..204b1ec 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[ 
-// draw a surface
 plot3d() ;
 // puts the titles
 xtitle( 'My surface is blue', 'X axis', 'Y axis', 'Z axis' ) ;
index d9e9219..25def39 100644 (file)
@@ -16,7 +16,7 @@
   </info>
   <refnamediv>
     <refname>graduate</refname>
-    <refpurpose> pretty axis graduations</refpurpose>
+    <refpurpose>Pretty axis graduations</refpurpose>
   </refnamediv>
   <refsynopsisdiv>
     <title>Calling Sequence</title>
     <title>Examples</title>
     <programlisting role="example"><![CDATA[ 
 y=(0:0.33:145.78)';
-clf();plot2d1('enn',0,y)
+clf();
+plot2d1('enn',0,y)
 [ymn,ymx,np]=graduate(min(y),max(y))
 rect=[1,ymn,prod(size(y)),ymx];
-clf();plot2d1('enn',0,y,1,'011',' ',rect,[10,3,10,np])
+clf();
+plot2d1('enn',0,y,1,'011',' ',rect,[10,3,10,np])
 ]]></programlisting>
   </refsection>
   <refsection role="see also">
index e15d854..edad895 100644 (file)
       the current graphics scale (for instance <literal>strf="x0z"</literal> in <literal>plot2d</literal>).
     </para>
   </refsection>
+  
+  <refsection>
+    <title>Sample</title>
+    <scilab:image>
+      isoview(-1,1,-1,1)
+      plot2d(sin(t),cos(t),1,"001")      
+    </scilab:image>
+  </refsection>
+  
   <refsection>
     <title>Examples</title>
     <programlisting role="example"><![CDATA[ 
index 562fa06..6e8bd28 100644 (file)
     </para>
   </refsection>
   <refsection>
+    <title>Sample</title>
+    <scilab:image>
+      xdel(winsid());
+      plot()
+      f=gcf();
+      replot([-1,-1,10,2],f.children(1))
+      replot([-3,-2,8,4],f.children(2)) 
+      
+    </scilab:image>
+  </refsection>
+  
+  <refsection>
     <title>Examples</title>
     <programlisting role="example"><![CDATA[ 
 backupstyle='?'
index 8a7cf7f..6fb535e 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()
@@ -58,7 +80,7 @@ plot(x,sinh(x))
 sca(a1); //make first axes current
 plot(t,asinh(t),'g')
 legend(['acosh','asinh'])
-sca(a2); //make seco├žnd axes current
+sca(a2); //make second axes current
 legend('sinh')
  ]]></programlisting>
   </refsection>
index 7c8e4f2..cf0d942 100644 (file)
@@ -65,7 +65,7 @@ subplot(221);
 plot2d(x-2,sin(x))
 subplot(222);
 plot2d(x-6,[2*cos(x)+.7 2*cos(x)+.9 cos(2*x) .2+sin(3*x)],[-1,-2,-3 -4])
-sda() // return to the  default values of the axes' model
+sda() // return to the default values of the axes' model
 subplot(223);
 plot2d(x-2,sin(x))
 subplot(224);
index ffce9f4..927683a 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)
index a21c7ed..930cfce 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")
index 41cf35c..997ec91 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="addcolor">
-  <info>
-    <pubdate>$LastChangedDate$</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="addcolor">
   <refnamediv>
     <refname>addcolor</refname>
     <refpurpose> add new colors to the current colormap</refpurpose>
     </para>
   </refsection>
   <refsection>
-    <title>Example</title>
+    <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();
 h = gcf();
index da94adf..23af46a 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="autumncolormap">
-  <info>
-    <pubdate>$LastChangedDate: 2008-03-26 09:50:39 +0100 (mer., 26 mars 2008) $</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="autumncolormap">
   <refnamediv>
     <refname>autumncolormap</refname>
     <refpurpose>red through orange to yellow colormap</refpurpose>
     </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();
index 9e1d1ab..fe4af6e 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="bonecolormap">
-  <info>
-    <pubdate>$LastChangedDate: 2008-03-26 09:50:39 +0100 (mer., 26 mars 2008) $</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="bonecolormap">
   <refnamediv>
     <refname>bonecolormap</refname>
     <refpurpose>gray colormap with a light blue tone</refpurpose>
     </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();
index f070c6e..a3caae3 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="color">
-  <info>
-    <pubdate>$LastChangedDate$</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="color">
   <refnamediv>
     <refname>color</refname>
     <refpurpose> returns the color id of a color</refpurpose>
     </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)';
index e042ef1..9417409 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="color_list">
-  <info>
-    <pubdate>$LastChangedDate$</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="color_list">
   <refnamediv>
     <refname>color_list</refname>
     <refpurpose> list of named colors</refpurpose>
index 54bb5c9..12bed14 100644 (file)
@@ -1,8 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="colorbar">
-  <info>
-    <pubdate>$LastChangedDate$</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="colorbar">
   <refnamediv>
     <refname>colorbar</refname>
     <refpurpose>draw a colorbar</refpurpose>
     </para>
   </refsection>
   <refsection>
+    <title>Sample</title>
+    <scilab:image> 
+      // 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)")
+      // example 2 
+      x = linspace(0,1,81);
+      z = cos(2*%pi*x)'*sin(2*%pi*x);
+      zm = min(z); zM = max(z);
+      zz = abs(0.5*cos(2*%pi*x)'*cos(2*%pi*x));
+      zzm = min(zz); zzM = max(zz);
+      clf();
+      xset("colormap",jetcolormap(64))
+      drawlater() ;
+      subplot(2,2,1)
+      colorbar(zm,zM)
+      Sgrayplot(x,x,z, strf="031", rect=[0 0 1 1])
+      xtitle("a Sgrayplot with a colorbar")
+      subplot(2,2,2)
+      colorbar(zm,zM)
+      plot3d1(x,x,z)
+      xtitle("a plot3d1 with a colorbar")
+      subplot(2,2,3)
+      colorbar(zzm,zzM)
+      plot3d1(x,x,zz)
+      xtitle("a plot3d1 with a colorbar")
+      subplot(2,2,4)
+      colorbar(zzm,zzM)
+      Sgrayplot(x,x,zz, strf="031", rect=[0 0 1 1])
+      xtitle("a Sgrayplot with a colorbar")
+      drawnow() ;
+      // example 3
+      x = linspace(0,1,81);
+      zz = abs(0.5*cos(2*%pi*x)'*cos(2*%pi*x));
+      zzm = min(zz); zzM = max(zz);
+      [xf,yf,zf]=genfac3d(x,x,zz);
+      nb_col = 64;
+      clf()
+      xset("colormap",hotcolormap(nb_col))
+      drawlater() ;
+      colorbar(zzm,zzM,[1, nb_col],fmt="%.1f")
+      nbcol = xget("lastpattern")
+      zcol = dsearch(zf, linspace(zzm, zzM, nb_col+1));
+      plot3d(xf, yf, list(zf, zcol), flag = [-2 6 4])
+      xtitle("a plot3d with shaded interpolated colors")
+      drawnow() ;
+      show_window()
+    </scilab:image>
+  </refsection>
+  <refsection>
     <title>Examples</title>
     <programlisting role="example"><![CDATA[ 
 // example 1
index ed5987a..d5ac916 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="colordef">
-  <info>
-    <pubdate>$LastChangedDate$</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="colordef">
   <refnamediv>
     <refname>colordef</refname>
     <refpurpose>Set default color values to display different color schemes</refpurpose>
     </itemizedlist>
   </refsection>
   <refsection>
+    <title>Sample</title>
+    <scilab:image> 
+    </scilab:image>
+  </refsection>
+  <refsection>
     <title>Examples</title>
     <programlisting role="example"><![CDATA[ 
  ]]></programlisting>
index d095283..9fdb03d 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="colormap">
-  <info>
-    <pubdate>$LastChangedDate$</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="colormap">
   <refnamediv>
     <refname>colormap</refname>
     <refpurpose> using colormaps</refpurpose>
@@ -113,4 +110,17 @@ 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 bd2d2f9..4e49db7 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="coolcolormap">
-  <info>
-    <pubdate>$LastChangedDate: 2008-03-26 09:50:39 +0100 (mer., 26 mars 2008) $</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="coolcolormap">
   <refnamediv>
     <refname>coolcolormap</refname>
     <refpurpose>cyan to magenta colormap</refpurpose>
     </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();
index 78d506b..def69f4 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="coppercolormap">
-  <info>
-    <pubdate>$LastChangedDate: 2008-03-26 09:50:39 +0100 (mer., 26 mars 2008) $</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="coppercolormap">
   <refnamediv>
     <refname>coppercolormap</refname>
     <refpurpose>black to a light copper tone colormap</refpurpose>
     </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();
index baf60ca..86c4044 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="getcolor">
-  <info>
-    <pubdate>$LastChangedDate$</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="getcolor">
   <refnamediv>
     <refname>getcolor</refname>
     <refpurpose> opens a dialog to show colors in the current colormap</refpurpose>
index fbf7191..f42b490 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="graycolormap">
-  <info>
-    <pubdate>$LastChangedDate$</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="graycolormap">
   <refnamediv>
     <refname>graycolormap</refname>
     <refpurpose>linear gray colormap</refpurpose>
     </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();
index ae3dbba..fe69541 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="hotcolormap">
-  <info>
-    <pubdate>$LastChangedDate$</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="hotcolormap">
   <refnamediv>
     <refname>hotcolormap</refname>
     <refpurpose> red to yellow colormap</refpurpose>
     </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();
index 88d5e7e..db16c87 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="hsv2rgb">
-  <info>
-    <pubdate>$LastChangedDate$</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="hsv2rgb">
   <refnamediv>
     <refname>hsv2rgb</refname>
     <refpurpose> Converts HSV colors to RGB</refpurpose>
     </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);
+      show_pixmap()
+      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);
+      show_pixmap()
+      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'); 
index bf9329b..376aeee 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="hsvcolormap">
-  <info>
-    <pubdate>$LastChangedDate$</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="hsvcolormap">
   <refnamediv>
     <refname>hsvcolormap</refname>
     <refpurpose>  Hue-saturation-value colormap</refpurpose>
     </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'); 
index 5f161b0..4597089 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="jetcolormap">
-  <info>
-    <pubdate>$LastChangedDate$</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="jetcolormap">
   <refnamediv>
     <refname>jetcolormap</refname>
     <refpurpose>blue to red colormap</refpurpose>
     </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[ 
 f = scf();
index c3a67af..b426850 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="name2rgb">
-  <info>
-    <pubdate>$LastChangedDate$</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="name2rgb">
   <refnamediv>
     <refname>name2rgb</refname>
     <refpurpose> returns the RGB values of a named color</refpurpose>
     </para>
   </refsection>
   <refsection>
+    <title>Sample</title>
+    <scilab:image> 
+      rgb=name2rgb("gold")
+      rgb2name(rgb)
+    </scilab:image>
+  </refsection>
+  <refsection>
     <title>Examples</title>
     <programlisting role="example"><![CDATA[ 
 rgb=name2rgb("gold")
index e932656..d345e65 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="oceancolormap">
-  <info>
-    <pubdate>$LastChangedDate: 2008-03-26 09:50:39 +0100 (mer., 26 mars 2008) $</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="oceancolormap">
   <refnamediv>
     <refname>oceancolormap</refname>
     <refpurpose>linear blue colormap</refpurpose>
     </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();
index 4690496..dfaf007 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="pinkcolormap">
-  <info>
-    <pubdate>$LastChangedDate: 2008-03-26 09:50:39 +0100 (mer., 26 mars 2008) $</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="pinkcolormap">
   <refnamediv>
     <refname>pinkcolormap</refname>
     <refpurpose>sepia tone colorization on black and white images</refpurpose>
     </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();
index b96d5ff..35bf063 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="rainbowcolormap">
-  <info>
-    <pubdate>$LastChangedDate: 2008-03-26 09:50:39 +0100 (mer., 26 mars 2008) $</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="rainbowcolormap">
   <refnamediv>
     <refname>rainbowcolormap</refname>
     <refpurpose>red through orange, yellow, green,blue to violet colormap</refpurpose>
     </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();
index 72286eb..2d0802c 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="rgb2name">
-  <info>
-    <pubdate>$LastChangedDate$</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="rgb2name">
   <refnamediv>
     <refname>rgb2name</refname>
     <refpurpose> returns the name of a color</refpurpose>
     </para>
   </refsection>
   <refsection>
+    <title>Sample</title>
+    <scilab:image> 
+      rgb2name(255,128,128)
+      rgb2name([255 215 0])
+      // get color #10 of the current colormap and find its name
+      cmap=get(gcf(),"color_map");
+      rgb2name(cmap(10,:)*255)
+    </scilab:image>
+  </refsection>
+  <refsection>
     <title>Examples</title>
     <programlisting role="example"><![CDATA[ 
 rgb2name(255,128,128)
index 29974be..a75fdeb 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="springcolormap">
-  <info>
-    <pubdate>$LastChangedDate: 2008-03-26 09:50:39 +0100 (mer., 26 mars 2008) $</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="springcolormap">
   <refnamediv>
     <refname>springcolormap</refname>
     <refpurpose>magenta to yellow colormap</refpurpose>
     </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();
index 11f0f90..87d54b4 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="summercolormap">
-  <info>
-    <pubdate>$LastChangedDate: 2008-03-26 09:50:39 +0100 (mer., 26 mars 2008) $</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="summercolormap">
   <refnamediv>
     <refname>summercolormap</refname>
     <refpurpose>green to yellow colormap</refpurpose>
     </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();
index c8465e7..848257f 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="whitecolormap">
-  <info>
-    <pubdate>$LastChangedDate: 2008-03-26 09:50:39 +0100 (mer., 26 mars 2008) $</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="whitecolormap">
   <refnamediv>
     <refname>whitecolormap</refname>
     <refpurpose>completely white colormap</refpurpose>
     <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();
index 45429f8..eb3deab 100644 (file)
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="wintercolormap">
-  <info>
-    <pubdate>$LastChangedDate: 2008-03-26 09:50:39 +0100 (mer., 26 mars 2008) $</pubdate>
-  </info>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:lang="en" xml:id="wintercolormap">
   <refnamediv>
     <refname>wintercolormap</refname>
     <refpurpose>blue to green colormap</refpurpose>
     </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();
index 8b1a411..e5fb9c7 100644 (file)
@@ -1,15 +1,15 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) ENPC - Jean-Philippe Chancelier
- * 
- * 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    
- * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
- *
- -->
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) ENPC - Jean-Philippe Chancelier
+* 
+* 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    
+* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+*
+-->
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="xpoly">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
       <literal>"marks"</literal> for using the current mark to draw the polyline.
     </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>
-    
-    <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>
     
     <title>Examples</title>
     <programlisting role="example"><![CDATA[ 
-x=sin(2*%pi*(0:4)/5);
-y=cos(2*%pi*(0:4)/5);
+    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
+    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
- ]]></programlisting>
+    e=gce(); // get the current entity (the last created: here the polyline)
+    e.closed = 'off' // the polyline is now open
+    ]]></programlisting>
   </refsection>
   <refsection role="see also">
     <title>See Also</title>
index 5e6fc2c..947379f 100644 (file)
@@ -17,7 +17,7 @@
   <refnamediv>
     <refname>move</refname>
     <refpurpose> 
-      move, translate,  a graphic entity and its children.
+      move, translate, a graphic entity and its children.
     </refpurpose>
   </refnamediv>
   <refsynopsisdiv>
       If the entity has children, they will be also translated.
     </para>
     <para>
-      Given the keyword <literal>"alone"</literal> , only the specified entity needs to be redrawn. 
+      Given the keyword <literal>"alone"</literal>, only the specified entity needs to be redrawn. 
       It must specially be used with the <literal>pixel_drawing_mode</literal> 
       property of the figure entity (see draw objects under
       <literal>"xor"</literal> drawing mode).
     </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();
index 32b41ef..d4b319c 100644 (file)
       where <literal>M</literal> stands for the corresponding rotation matrix.
     </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[