Added scatter and scatter3 33/16433/2
Juergen KOCH [Thu, 30 Apr 2015 12:48:51 +0000 (14:48 +0200)]
Change-Id: I09a11411c6c760f1b7bc42f731909b7d80d2c303

24 files changed:
scilab/modules/graphics/help/en_US/2d_plot/scatter.xml [new file with mode: 0644]
scilab/modules/graphics/help/en_US/2d_plot/scatter3.xml [new file with mode: 0644]
scilab/modules/graphics/macros/scatter.sci [new file with mode: 0644]
scilab/modules/graphics/macros/scatter3.sci [new file with mode: 0644]
scilab/modules/graphics/macros/scatterScanVargin.sci [new file with mode: 0644]
scilab/modules/graphics/macros/scatterSetPoyline.sci [new file with mode: 0644]
scilab/modules/helptools/images/scatter3_1.png [new file with mode: 0644]
scilab/modules/helptools/images/scatter3_2.png [new file with mode: 0644]
scilab/modules/helptools/images/scatter3_3.png [new file with mode: 0644]
scilab/modules/helptools/images/scatter3_4.png [new file with mode: 0644]
scilab/modules/helptools/images/scatter3_5.png [new file with mode: 0644]
scilab/modules/helptools/images/scatter3_6.png [new file with mode: 0644]
scilab/modules/helptools/images/scatter3_7.png [new file with mode: 0644]
scilab/modules/helptools/images/scatter3_8.png [new file with mode: 0644]
scilab/modules/helptools/images/scatter3_9.png [new file with mode: 0644]
scilab/modules/helptools/images/scatter_1.png [new file with mode: 0644]
scilab/modules/helptools/images/scatter_2.png [new file with mode: 0644]
scilab/modules/helptools/images/scatter_3.png [new file with mode: 0644]
scilab/modules/helptools/images/scatter_4.png [new file with mode: 0644]
scilab/modules/helptools/images/scatter_5.png [new file with mode: 0644]
scilab/modules/helptools/images/scatter_6.png [new file with mode: 0644]
scilab/modules/helptools/images/scatter_7.png [new file with mode: 0644]
scilab/modules/helptools/images/scatter_8.png [new file with mode: 0644]
scilab/modules/helptools/images/scatter_9.png [new file with mode: 0644]

diff --git a/scilab/modules/graphics/help/en_US/2d_plot/scatter.xml b/scilab/modules/graphics/help/en_US/2d_plot/scatter.xml
new file mode 100644 (file)
index 0000000..93a678e
--- /dev/null
@@ -0,0 +1,488 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) Scilab Enterprises - 2015 - 2012 - Juergen Koch
+ *
+ * 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.1-en.txt
+ *
+ -->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"  xml:lang="en" xml:id="scatter">
+    <refnamediv>
+        <refname>scatter</refname>
+        <refpurpose>2D scatter plot</refpurpose>
+    </refnamediv>
+    <refsynopsisdiv>
+        <title>Calling Sequence</title>
+        <synopsis>
+          scatter(x,y,&lt;s&gt;,&lt;c&gt;,&lt;"fill"&gt;,&lt;marker&gt;,&lt;marker_property,value&gt;)
+          scatter(&lt;axes_handle&gt;,...)
+        </synopsis>
+    </refsynopsisdiv>
+    <refsection>
+        <title>Arguments</title>
+        <variablelist>
+            <varlistentry>
+                <term>x</term>
+                <listitem>
+                    <para>
+                        A column or row vector of n real numbers
+                        specifying the x positions of the markers center.
+                        x and y must be vectors of the same length.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>y</term>
+                <listitem>
+                    <para>
+                        A column or row vector of n real numbers
+                        specifying the y positions of the markers center.
+                        x and y must be vectors of the same length.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>s</term>
+                <listitem>
+                    <para>
+                        Specifying the sizes of the markers.
+                        To plot each marker with equal size, specify s as a scalar.
+                        To plot each marker with a diferent size, specify s as a vector with length equal to the length of x and y.
+                        The units for s is points squared with a default value of 36 points squared.
+                        The size equals the area of the circle surrounding the marker.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>c</term>
+                <listitem>
+                    <para>
+                        Specifying the colors of the markers.
+                        To plot each marker with the same color, specify c as a string representing a known color, see <link linkend="color_list">color_list</link>.
+                        A color can also be specified by a vector of 3 RGB values.
+                        RGB values correspond to red, green and blue intensity between 0 and 1.
+                        To plot each marker with a diferent color, specify c as a vector with length equal to the length of x and y.
+                        The values of c are linarly mapped to the colors in the current colormap.
+                        Colors can also by specified by a matrix of RGB values or a vector of strings representing known colors.
+                        A matrix of RGB values has 3 columns and the number of rows equals the length of x and y.
+                        The default color is "blue". 
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>&lt;"fill"&gt;</term>
+                <listitem>
+                    <para>
+                        This string indicates that the markers are filled with colors.
+                        The markers background colors are set using the values of c.
+                        If c is not specified the fill color can be defined by the marker property "markerFaceColor" or "markerBackgroundColor".
+                        The default color is "blue".  
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>&lt;marker&gt;</term>
+                <listitem>
+                    <para>
+                        Select the type of the marker.
+                        The figure below shows the 15 different marker types.
+                    </para>
+                    <para>
+                        <inlinemediaobject>
+                            <imageobject>
+                                <imagedata fileref="../../images/marks.svg"/>
+                            </imageobject>
+                        </inlinemediaobject>
+                    </para>
+                    <para>
+                        Marker types are specified by strings, see the table below.
+                    </para>
+                    <para>
+                    <informaltable border="1">
+                        <tr>
+                            <td>
+                                String
+                            </td>
+                            <td>
+                                Marker type
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"."</literal>
+                            </td>
+                            <td>Point</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"+"</literal>
+                            </td>
+                            <td>Plus sign</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"x"</literal>
+                            </td>
+                            <td>Cross</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"circle plus"</literal>
+                            </td>
+                            <td>Circle with plus</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"filled diamond"</literal>
+                            </td>
+                            <td>Filled diamond</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"d"</literal> or
+                                <literal>"diamond"</literal>
+                            </td>
+                            <td>Diamond</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"^"</literal>
+                            </td>
+                            <td>Upward-pointing triangle</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"v"</literal>
+                            </td>
+                            <td>Downward-pointing triangle</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"diamond plus"</literal>
+                            </td>
+                            <td>Diamond with plus</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"o"</literal>
+                            </td>
+                            <td>Circle (default)</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"*"</literal>
+                            </td>
+                            <td>Asterisk</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"s"</literal> or
+                                <literal>"square"</literal>
+                            </td>
+                            <td>Square</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"&gt;"</literal>
+                            </td>
+                            <td>Right-pointing triangle</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"&lt;"</literal>
+                            </td>
+                            <td>Left-pointing triangle</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"pentagram"</literal> or
+                                <literal>"p"</literal>
+                            </td>
+                            <td>Five-pointed star</td>
+                        </tr>
+                     </informaltable>
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>&lt;marker_property,value&gt;</term>
+                <listitem>
+                    <para>
+                         A sequence of property value pairs can be used to specify type, color and line width of the markers.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>&lt;"marker",value&gt; or &lt;"markerStyle",value&gt;</term>
+                <listitem>
+                    <para>
+                        Specify the type of the marker, see the table above.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>&lt;"markerEdgeColor",value&gt; or &lt;"markerForground",value&gt;</term>
+                <listitem>
+                    <para>
+                        Specify the foreground color of the marker.
+                        A color can be specified by a string representing a known color, see <link linkend="color_list">color_list</link>.
+                        A color can also be specified by a vector of 3 RGB values.
+                        RGB values correspond to red, green and blue intensity between 0 and 1.
+                        This option is superseded by argument c.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>&lt;"markerFaceColor",value&gt; or &lt;"markerBackground",value&gt;</term>
+                <listitem>
+                    <para>
+                        Specify the background color of the marker.
+                        A color can be specified by a string representing a known color, see <link linkend="color_list">color_list</link>.
+                        A color can also be specified by a vector of 3 RGB values.
+                        RGB values correspond to red, green and blue intensity between 0 and 1.
+                        This option is superseded by argument c.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>&lt;"linewidth",value&gt; or &lt;"thickness",value&gt;</term>
+                <listitem>
+                    <para>
+                        Specify the thickness of the edge of the marker.
+                        The unit for the value is one point.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>&lt;axes_handle&gt;</term>
+                <listitem>
+                    <para>This optional argument forces the scatter plot to appear inside the
+                        selected axes given by <literal>axes_handle</literal> rather than inside the
+                        current axes, see <link linkend="gca">gca</link>.
+                    </para>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+    </refsection>
+    <refsection>
+        <title>Description</title>
+        <para>
+            <literal>scatter(x,y)</literal> creates a scatter plot with markers at the locations specified by x and y.
+            The default type of the marker is a circle, the default color is "blue" and the default size is 36.
+            This means the circle surrounding the marker has an area of 36 points squared. 
+        </para>
+        <para>
+            Using <literal>scatter(x,y,s,c)</literal> different sizes and colors for each marker can be specified. 
+            There are many different ways to specify marker types, marker colors and marker sizes.
+            For more details see the description of the arguments and the examples.
+        </para>
+    </refsection>
+    <refsection>
+        <title>Remarks</title>
+        <para>
+            If you want to specify colors without specifying sizes use <literal>scatter(x,y,[],c)</literal>. 
+        </para>
+    </refsection>
+    <refsection>
+        <title>Examples</title>
+        <para>
+            Create 2D scatter plot
+        </para>
+        <programlisting role="example"><![CDATA[
+// x and y initialisation
+x = linspace(0,2,200)
+y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x))
+// create 2D scatter plot
+scatter(x,y)
+ ]]></programlisting>
+        <scilab:image>
+x = linspace(0,2,200)
+y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x))
+scatter(x,y)
+        </scilab:image>
+        <para>
+           Vary marker size
+        </para>
+        <programlisting role="example"><![CDATA[
+// x and y initialisation
+x = linspace(0,2,200)
+y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x))
+// specify different sizes
+a = linspace(1,100,length(x))
+// create 2D scatter plot
+scatter(x,y,a)
+ ]]></programlisting>
+        <scilab:image>
+x = linspace(0,2,200)
+y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x))
+a = linspace(1,100,length(x))
+scatter(x,y,a)
+        </scilab:image>
+        <para>
+           Vary marker color
+        </para>
+        <programlisting role="example"><![CDATA[
+// x and y initialisation
+x = linspace(0,2,200)
+y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x))
+// set color map
+set(gcf(),"color_map",coolcolormap(64))
+// colors according to x values 
+c = x
+// create 2D scatter plot
+scatter(x,y,[],c)
+ ]]></programlisting>
+        <scilab:image>
+x = linspace(0,2,200)
+y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x))
+set(gcf(),"color_map",coolcolormap(64))
+c = x
+scatter(x,y,[],c)
+        </scilab:image>
+        <para>
+           Fill the markers
+        </para>
+        <programlisting role="example"><![CDATA[
+// x and y initialisation
+x = linspace(0,2,200)
+y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x))
+// set color map
+set(gcf(),"color_map",coolcolormap(64))
+// colors according to y values 
+c = y
+// create 2D scatter plot
+scatter(x,y,[],c,"fill")
+ ]]></programlisting>
+        <scilab:image>
+x = linspace(0,2,200)
+y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x))
+set(gcf(),"color_map",coolcolormap(64))
+c = y
+scatter(x,y,[],c,"fill")
+        </scilab:image>
+        <para>
+            Specify marker symbol
+        </para>
+        <programlisting role="example"><![CDATA[
+// x and y initialisation
+x = rand(1,200)
+y = rand(1,200)
+// create 2D scatter plot
+scatter(x,y,"d")
+ ]]></programlisting>
+        <scilab:image>
+x = rand(1,200)
+y = rand(1,200)
+scatter(x,y,"d")
+        </scilab:image>
+        <para>
+            Change marker color and line width
+        </para>
+        <programlisting role="example"><![CDATA[
+// x and y initialisation
+x = rand(1,200)
+y = rand(1,200)
+// create 2D scatter plot
+scatter(x,y,"markerEdgeColor",[0 .4 .4],...
+            "markerFaceColor",[0 .8 .8],...
+            "linewidth",1.5)
+ ]]></programlisting>
+        <scilab:image>
+x = rand(1,200)
+y = rand(1,200)
+scatter(x,y,"markerEdgeColor",[0 .4 .4],...
+            "markerFaceColor",[0 .8 .8],...
+            "linewidth",1.5)
+        </scilab:image>
+        <para>
+            Specify subplot for scatter plot
+        </para>
+        <programlisting role="example"><![CDATA[
+// x and y initialisation
+x = linspace(0,2,100)
+y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x))
+// create 2D scatter subplot
+subplot(2,1,1)
+scatter(gca(),x,y)
+// create 2D scatter subplot
+subplot(2,1,2)
+scatter(gca(),x,y,"fill","s")
+ ]]></programlisting>
+        <scilab:image>
+x = linspace(0,2,100)
+y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x))
+subplot(2,1,1)
+scatter(gca(),x,y)
+subplot(2,1,2)
+scatter(gca(),x,y,"fill","s")
+        </scilab:image>
+        <para>
+            Modify scatter plot after creation
+        </para>
+        <programlisting role="example"><![CDATA[
+// x and y initialisation
+t = linspace(0,1,200)
+x = t.*cos(10*%pi*t)
+y = t.*sin(10*%pi*t)
+// create 2D scatter plot
+s = scatter(x,y)
+ ]]></programlisting>
+        <scilab:image>
+t = linspace(0,1,200)
+x = t.*cos(10*%pi*t)
+y = t.*sin(10*%pi*t)
+s = scatter(x,y)
+        </scilab:image>
+        <programlisting role="example"><![CDATA[
+// get current entity
+ce = gce()
+// get polyline
+pl = ce.children
+// modify ployline 
+pl.thickness = 0.5
+pl.mark_foreground = addcolor(name2rgb("darkblue")/255)
+pl.mark_background = addcolor([0 0.4 0.4])
+ ]]></programlisting>
+        <scilab:image>
+t = linspace(0,1,200)
+x = t.*cos(10*%pi*t)
+y = t.*sin(10*%pi*t)
+s = scatter(x,y)
+ce = gce()
+pl = ce.children
+pl.thickness = 0.5
+pl.mark_foreground = addcolor(name2rgb("darkblue")/255)
+pl.mark_background = addcolor([0 0.4 0.4])
+        </scilab:image>
+    </refsection>
+    <refsection role="see also">
+        <title>See Also</title>
+        <simplelist type="inline">
+            <member>
+                <link linkend="scatter3">scatter3</link>
+            </member>
+            <member>
+                <link linkend="plot">plot</link>
+            </member>
+            <member>
+                <link linkend="gca">gca</link>
+            </member>
+            <member>
+                <link linkend="gce">gce</link>
+            </member>
+            <member>
+                <link linkend="gcf">gcf</link>
+            </member>
+            <member>
+                <link linkend="color_list">color_list</link>
+            </member>
+            <member>
+                <link linkend="polyline_properties">polyline_properties</link>
+            </member>
+        </simplelist>
+    </refsection>
+</refentry>
diff --git a/scilab/modules/graphics/help/en_US/2d_plot/scatter3.xml b/scilab/modules/graphics/help/en_US/2d_plot/scatter3.xml
new file mode 100644 (file)
index 0000000..5e8a6cf
--- /dev/null
@@ -0,0 +1,542 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) Scilab Enterprises - 2015 - 2012 - Juergen Koch
+ *
+ * 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.1-en.txt
+ *
+ -->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"  xml:lang="en" xml:id="scatter3">
+    <refnamediv>
+        <refname>scatter3</refname>
+        <refpurpose>3D scatter plot</refpurpose>
+    </refnamediv>
+    <refsynopsisdiv>
+        <title>Calling Sequence</title>
+        <synopsis>
+          scatter3(x,y,z,&lt;s&gt;,&lt;c&gt;,&lt;"fill"&gt;,&lt;marker&gt;,&lt;marker_property,value&gt;)
+          scatter3(&lt;axes_handle&gt;,...)
+        </synopsis>
+    </refsynopsisdiv>
+    <refsection>
+        <title>Arguments</title>
+        <variablelist>
+            <varlistentry>
+                <term>x</term>
+                <listitem>
+                    <para>
+                        A column or row vector of n real numbers
+                        specifying the x positions of the markers center.
+                        x, y and z must be vectors of the same length.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>y</term>
+                <listitem>
+                    <para>
+                        A column or row vector of n real numbers
+                        specifying the y positions of the markers center.
+                        x, y and z must be vectors of the same length.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>z</term>
+                <listitem>
+                    <para>
+                        A column or row vector of n real numbers
+                        specifying the y positions of the markers center.
+                        x, y and z must be vectors of the same length.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>s</term>
+                <listitem>
+                    <para>
+                        Specifying the sizes of the markers.
+                        To plot each marker with equal size, specify s as a scalar.
+                        To plot each marker with a diferent size, specify s as a vector with length equal to the length of x, y and z.
+                        The units for s is points squared with a default value of 36 points squared.
+                        The size equals the area of the circle surrounding the marker.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>c</term>
+                <listitem>
+                    <para>
+                        Specifying the colors of the markers.
+                        To plot each marker with the same color, specify c as a string representing a known color, see <link linkend="color_list">color_list</link>.
+                        A color can also be specified by a vector of 3 RGB values.
+                        RGB values correspond to red, green and blue intensity between 0 and 1.
+                        To plot each marker with a diferent color, specify c as a vector with length equal to the length of x, y and z.
+                        The values of c are linarly mapped to the colors in the current colormap.
+                        Colors can also by specified by a matrix of RGB values or a vector of strings representing known colors.
+                        A matrix of RGB values has 3 columns and the number of rows equals the length of x, y and z.
+                        The default color is "blue". 
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>&lt;"fill"&gt;</term>
+                <listitem>
+                    <para>
+                        This string indicates that the markers are filled with colors.
+                        The markers background colors are set using the values of c.
+                        If c is not specified the fill color can be defined by the marker property "markerFaceColor" or "markerBackgroundColor".
+                        The default color is "blue".  
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>&lt;marker&gt;</term>
+                <listitem>
+                    <para>
+                        Select the type of the marker.
+                        The figure below shows the 15 different marker types.
+                    </para>
+                    <para>
+                        <inlinemediaobject>
+                            <imageobject>
+                                <imagedata fileref="../../images/marks.svg"/>
+                            </imageobject>
+                        </inlinemediaobject>
+                    </para>
+                    <para>
+                        Marker types are specified by strings, see the table below.
+                    </para>
+                    <para>
+                    <informaltable border="1">
+                        <tr>
+                            <td>
+                                String
+                            </td>
+                            <td>
+                                Marker type
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"."</literal>
+                            </td>
+                            <td>Point</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"+"</literal>
+                            </td>
+                            <td>Plus sign</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"x"</literal>
+                            </td>
+                            <td>Cross</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"circle plus"</literal>
+                            </td>
+                            <td>Circle with plus</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"filled diamond"</literal>
+                            </td>
+                            <td>Filled diamond</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"d"</literal> or
+                                <literal>"diamond"</literal>
+                            </td>
+                            <td>Diamond</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"^"</literal>
+                            </td>
+                            <td>Upward-pointing triangle</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"v"</literal>
+                            </td>
+                            <td>Downward-pointing triangle</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"diamond plus"</literal>
+                            </td>
+                            <td>Diamond with plus</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"o"</literal>
+                            </td>
+                            <td>Circle (default)</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"*"</literal>
+                            </td>
+                            <td>Asterisk</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"s"</literal> or
+                                <literal>"square"</literal>
+                            </td>
+                            <td>Square</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"&gt;"</literal>
+                            </td>
+                            <td>Right-pointing triangle</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"&lt;"</literal>
+                            </td>
+                            <td>Left-pointing triangle</td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <literal>"pentagram"</literal> or
+                                <literal>"p"</literal>
+                            </td>
+                            <td>Five-pointed star</td>
+                        </tr>
+                     </informaltable>
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>&lt;marker_property,value&gt;</term>
+                <listitem>
+                    <para>
+                         A sequence of property value pairs can be used to specify type, color and line width of the markers.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>&lt;"marker",value&gt; or &lt;"markerStyle",value&gt;</term>
+                <listitem>
+                    <para>
+                        Specify the type of the marker, see the table above.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>&lt;"markerEdgeColor",value&gt; or &lt;"markerForground",value&gt;</term>
+                <listitem>
+                    <para>
+                        Specify the foreground color of the marker.
+                        A color can be specified by a string representing a known color, see <link linkend="color_list">color_list</link>.
+                        A color can also be specified by a vector of 3 RGB values.
+                        RGB values correspond to red, green and blue intensity between 0 and 1.
+                        This option is superseded by argument c.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>&lt;"markerFaceColor",value&gt; or &lt;"markerBackground",value&gt;</term>
+                <listitem>
+                    <para>
+                        Specify the background color of the marker.
+                        A color can be specified by a string representing a known color, see <link linkend="color_list">color_list</link>.
+                        A color can also be specified by a vector of 3 RGB values.
+                        RGB values correspond to red, green and blue intensity between 0 and 1.
+                        This option is superseded by argument c.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>&lt;"linewidth",value&gt; or &lt;"thickness",value&gt;</term>
+                <listitem>
+                    <para>
+                        Specify the thickness of the edge of the marker.
+                        The unit for the value is one point.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>&lt;axes_handle&gt;</term>
+                <listitem>
+                    <para>This optional argument forces the scatter plot to appear inside the
+                        selected axes given by <literal>axes_handle</literal> rather than inside the
+                        current axes, see <link linkend="gca">gca</link>.
+                    </para>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+    </refsection>
+    <refsection>
+        <title>Description</title>
+        <para>
+            <literal>scatter3(x,y)</literal> creates a scatter plot with markers at the locations specified by x and y.
+            The default type of the marker is a circle, the default color is "blue" and the default size is 36.
+            This means the circle surrounding the marker has an area of 36 points squared. 
+        </para>
+        <para>
+            Using <literal>scatter3(x,y,s,c)</literal> different sizes and colors for each marker can be specified. 
+            There are many different ways to specify marker types, marker colors and marker sizes.
+            For more details see the description of the arguments and the examples.
+        </para>
+    </refsection>
+    <refsection>
+        <title>Remarks</title>
+        <para>
+            If you want to specify colors without specifying sizes use <literal>scatter3(x,y,[],c)</literal>. 
+        </para>
+    </refsection>
+    <refsection>
+        <title>Examples</title>
+        <para>
+            Create 3D scatter plot
+        </para>
+        <programlisting role="example"><![CDATA[
+// x, y and z initialisation
+t = 1:200
+x = t.*cos(t).*sin(t)
+y = t.*sin(t).*sin(t)
+z = t.*cos(t)
+// create 3D scatter plot
+scatter3(x,y,z)
+// modify rotation angles
+set(gca(),"rotation_angles",[60,45])
+ ]]></programlisting>
+        <scilab:image>
+t = 1:200
+x = t.*cos(t).*sin(t)
+y = t.*sin(t).*sin(t)
+z = t.*cos(t)
+scatter3(x,y,z)
+set(gca(),"rotation_angles",[60,45])
+        </scilab:image>
+        <para>
+           Vary marker size
+        </para>
+        <programlisting role="example"><![CDATA[
+// x, y and z initialisation
+t = 1:200
+x = t.*cos(t).*sin(t)
+y = t.*sin(t).*sin(t)
+z = t.*cos(t)
+// size according to radius
+s = t
+// create 3D scatter plot
+scatter3(x,y,z,s)
+// modify rotation angles
+set(gca(),"rotation_angles",[60,45])
+ ]]></programlisting>
+        <scilab:image>
+t = 1:200
+x = t.*cos(t).*sin(t)
+y = t.*sin(t).*sin(t)
+z = t.*cos(t)
+s = t
+scatter3(x,y,z,s)
+set(gca(),"rotation_angles",[60,45])
+        </scilab:image>
+        <para>
+           Vary marker color
+        </para>
+        <programlisting role="example"><![CDATA[
+// x, y and z initialisation
+t = 1:200
+x = t.*cos(t).*sin(t)
+y = t.*sin(t).*sin(t)
+z = t.*cos(t)
+// set color map
+set(gcf(),"color_map",coolcolormap(64))
+// color according to radius
+c = t
+// create 3D scatter plot
+scatter3(x,y,z,[],c)
+// modify rotation angles
+set(gca(),"rotation_angles",[60,45])
+ ]]></programlisting>
+        <scilab:image>
+t = 1:200
+x = t.*cos(t).*sin(t)
+y = t.*sin(t).*sin(t)
+z = t.*cos(t)
+set(gcf(),"color_map",coolcolormap(64))
+c = t
+scatter3(x,y,z,[],c)
+set(gca(),"rotation_angles",[60,45])
+        </scilab:image>
+        <para>
+           Fill the markers
+        </para>
+        <programlisting role="example"><![CDATA[
+// x, y and z initialisation
+z = linspace(0,6*%pi,200)
+x = cos(z)
+y = sin(z)
+// create 3D scatter plot
+scatter3(x,y,z,"fill")
+// modify rotation angles
+set(gca(),"rotation_angles",[60,45])
+ ]]></programlisting>
+        <scilab:image>
+z = linspace(0,6*%pi,200)
+x = cos(z)
+y = sin(z)
+scatter3(x,y,z,"fill")
+set(gca(),"rotation_angles",[60,45])
+        </scilab:image>
+        <para>
+            Specify marker symbol
+        </para>
+        <programlisting role="example"><![CDATA[
+// x, y and z initialisation
+z = linspace(0,6*%pi,200)
+x = cos(z)
+y = sin(z)
+// create 3D scatter plot
+scatter3(x,y,z,"*")
+// modify rotation angles
+set(gca(),"rotation_angles",[60,45])
+ ]]></programlisting>
+        <scilab:image>
+z = linspace(0,6*%pi,200)
+x = cos(z)
+y = sin(z)
+scatter3(x,y,z,"*")
+set(gca(),"rotation_angles",[60,45])
+        </scilab:image>
+        <para>
+            Change marker edge and face color
+        </para>
+        <programlisting role="example"><![CDATA[
+// x, y and z initialisation
+z = linspace(0,6*%pi,200)
+x = cos(z)
+y = sin(z)
+// create 3D scatter plot
+scatter3(x,y,z,...
+        "markerEdgeColor","black",...
+        "markerFaceColor",[0 .8 .8])
+// modify rotation angles
+set(gca(),"rotation_angles",[60,45])
+ ]]></programlisting>
+        <scilab:image>
+z = linspace(0,6*%pi,200)
+x = cos(z)
+y = sin(z)
+scatter3(x,y,z,...
+        "markerEdgeColor","black",...
+        "markerFaceColor",[0 .8 .8])
+set(gca(),"rotation_angles",[60,45])
+        </scilab:image>
+        <para>
+            Specify subplot for scatter plot
+        </para>
+        <programlisting role="example"><![CDATA[
+// x, y and z initialisation
+n = 20
+[x,y] = meshgrid(linspace(-2,2,n))
+z = exp(-x.^2-y.^2)
+// create 3D scatter subplot
+subplot(2,1,1)
+scatter3(gca(),x(:),y(:),z(:))
+// modify rotation angles
+set(gca(),"rotation_angles",[60,45])
+// create 3D scatter subplot
+subplot(2,1,2)
+scatter3(gca(),x(:),y(:),z(:),"markerFaceColor",[0 .8 .8])
+// modify rotation angles
+set(gca(),"rotation_angles",[60,45])
+ ]]></programlisting>
+        <scilab:image>
+n = 20
+[x,y] = meshgrid(linspace(-2,2,n))
+z = exp(-x.^2-y.^2)
+subplot(2,1,1)
+scatter3(gca(),x(:),y(:),z(:))
+set(gca(),"rotation_angles",[60,45])
+subplot(2,1,2)
+scatter3(gca(),x(:),y(:),z(:),"markerFaceColor",[0 .8 .8])
+set(gca(),"rotation_angles",[60,45])        </scilab:image>
+        <para>
+            Modify scatter plot after creation
+        </para>
+        <programlisting role="example"><![CDATA[
+// x, y and z initialisation
+t = 1:200
+x = t.*cos(t).*sin(t)
+y = t.*sin(t).*sin(t)
+z = t.*cos(t)
+// size according to radius
+s = t
+// create 3D scatter plot
+scatter3(x,y,z,s)
+// modify rotation angles
+set(gca(),"rotation_angles",[60,45])
+ ]]></programlisting>
+        <scilab:image>
+t = 1:200
+x = t.*cos(t).*sin(t)
+y = t.*sin(t).*sin(t)
+z = t.*cos(t)
+s = t
+scatter3(x,y,z,s)
+set(gca(),"rotation_angles",[60,45])
+        </scilab:image>
+        <programlisting role="example"><![CDATA[
+// get polyline
+polyLine = gce()
+// modify ployline 
+polyLine.mark_foreground = addcolor([0.5 0 0])
+polyLine.mark_background = addcolor([0.5 0.5 0])
+ ]]></programlisting>
+        <scilab:image>
+t = 1:200
+x = t.*cos(t).*sin(t)
+y = t.*sin(t).*sin(t)
+z = t.*cos(t)
+s = t
+scatter3(x,y,z,s)
+set(gca(),"rotation_angles",[60,45])
+polyLine = gce()
+// modify ployline 
+polyLine.mark_foreground = addcolor([0.5 0 0])
+polyLine.mark_background = addcolor([0.5 0.5 0])
+        </scilab:image>
+    </refsection>
+    <refsection role="see also">
+        <title>See Also</title>
+        <simplelist type="inline">
+            <member>
+                <link linkend="scatter">scatter</link>
+            </member>
+            <member>
+                <link linkend="param3d">param3d</link>
+            </member>
+            <member>
+                <link linkend="gca">gca</link>
+            </member>
+            <member>
+                <link linkend="gce">gce</link>
+            </member>
+            <member>
+                <link linkend="gcf">gcf</link>
+            </member>
+            <member>
+                <link linkend="color_list">color_list</link>
+            </member>
+            <member>
+                <link linkend="polyline_properties">polyline_properties</link>
+            </member>
+        </simplelist>
+    </refsection>
+</refentry>
diff --git a/scilab/modules/graphics/macros/scatter.sci b/scilab/modules/graphics/macros/scatter.sci
new file mode 100644 (file)
index 0000000..7db2fb3
--- /dev/null
@@ -0,0 +1,85 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Scilab Enterprises - 2015 - 2012 - Juergen Koch <juergen.koch@hs-esslingen.de>
+// 
+// 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
+
+function scatter(varargin)
+
+    [lhs,rhs] = argn(0);
+
+    if ~rhs
+        //
+        // add example ???
+        //
+    end
+
+   //detect and set the current axes now:
+    if type(varargin(1)) == 9 then // graphic handle
+        hdle = varargin(1);
+        if hdle.type == "Axes" then
+            if size(varargin) < 3 then
+                warning("Not enough input arguments.")
+                return;
+            else
+                 disp("Graphic handle specified!")
+                axesHandle = varargin(1);
+                X = varargin(2);
+                Y = varargin(3);
+                nextArgin = 4;
+            end
+        else
+            warning("Handle should be an Axes handle.")
+            return;
+        end
+    else
+        if size(varargin) < 2 then
+            warning("Not enough input arguments.")
+            return;
+        else
+            axesHandle = [];
+            X = varargin(1);
+            Y = varargin(2);
+            nextArgin = 3;
+        end
+    end
+
+    if (isempty(X) & isempty(Y)) then
+        // nothing has to be done
+        return;
+    end
+    
+    if (~isvector(X) | ~isvector(Y) | size(X) ~= size(Y)) then
+        warning("X and Y must be vectors of the same length.")
+        return;
+    end
+    
+    n = length(X);
+    [S,C,thickness,markStyle,markFg,markBg,fill,scanFailed] = scatterScanVargin(varargin,nextArgin,n);
+    if (scanFailed) then
+        return;
+    end
+
+    drawlater();
+    if isempty(axesHandle) then
+       plot(X,Y);
+    else
+       plot(axesHandle,X,Y);
+    end
+    
+    currentEntity = gce();
+    polyLine = currentEntity.children;
+    if polyLine.Type <> "Polyline" then
+        warning("Handle should be a Polyline handle.");
+        return;
+    end
+
+    scatterSetPoyline(polyLine,S,C,thickness,markStyle,markFg,markBg,fill);
+    
+    drawnow();
+
+endfunction
diff --git a/scilab/modules/graphics/macros/scatter3.sci b/scilab/modules/graphics/macros/scatter3.sci
new file mode 100644 (file)
index 0000000..aacc511
--- /dev/null
@@ -0,0 +1,91 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Scilab Enterprises - 2015 - 2012 - Juergen Koch <juergen.koch@hs-esslingen.de>
+// 
+// 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
+
+function scatter3(varargin)
+
+    [lhs,rhs] = argn(0);
+
+    if ~rhs
+        //
+        // add example ???
+        //
+    end
+
+   //detect and set the current axes now:
+    if type(varargin(1)) == 9 then // graphic handle
+        hdle = varargin(1);
+        if hdle.type == "Axes" then
+            if size(varargin) < 4 then
+                warning("Not enough input arguments.")
+                return;
+            else
+                 disp("Graphic handle specified!")
+                axesHandle = varargin(1);
+                X = varargin(2);
+                Y = varargin(3);
+                Z = varargin(4);
+                nextArgin = 5;
+            end
+        else
+            warning("Handle should be an Axes handle.")
+            return;
+        end
+    else
+        if size(varargin) < 3 then
+            warning("Not enough input arguments.")
+            return;
+        else
+            axesHandle = [];
+            X = varargin(1);
+            Y = varargin(2);
+            Z = varargin(3);
+            nextArgin = 4;
+        end
+    end
+
+    if (isempty(X) & isempty(Y) & isempty(Z)) then
+        // nothing has to be done
+        return;
+    end
+    
+    if (~isvector(X) | ~isvector(Y) | ~isvector(Z) | size(X) ~= size(Y) | size(X) ~= size(Z)) then
+        warning("X, Y and Z must be vectors of the same length.")
+        return;
+    end
+    
+    n = length(X);
+    [S,C,thickness,markStyle,markFg,markBg,fill,scanFailed] = scatterScanVargin(varargin,nextArgin,n);
+    if (scanFailed) then
+        return;
+    end
+    
+    drawlater();
+    if isempty(axesHandle) then
+       param3d(X,Y,Z);
+    else
+       set("current_axes",axesHandle)
+       param3d(X,Y,Z);
+    end
+    
+    polyLine = gce();
+    if polyLine.Type <> "Polyline" then
+        warning("Handle should be a Polyline handle.");
+        return;
+    end
+
+    scatterSetPoyline(polyLine,S,C,thickness,markStyle,markFg,markBg,fill);
+    
+    set(gca(),"cube_scaling","on");
+    set(gca(),"grid",[1 1 1]);
+    
+    drawnow();
+
+endfunction
+
diff --git a/scilab/modules/graphics/macros/scatterScanVargin.sci b/scilab/modules/graphics/macros/scatterScanVargin.sci
new file mode 100644 (file)
index 0000000..d8853bb
--- /dev/null
@@ -0,0 +1,286 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Scilab Enterprises - 2015 - 2012 - Juergen Koch <juergen.koch@hs-esslingen.de>
+// 
+// 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
+
+function [S,C,thickness,markStyle,markFg,markBg,fill,scanFailed] = scatterScanVargin(argins,nextArgin,n)
+
+    scanFailed = %F;
+    
+    // check for size argument
+    // disp("check for size");
+    // disp(["nextArgin = " string(nextArgin)]);
+    S = [];
+    if  size(argins) >= nextArgin then
+        if isempty(argins(nextArgin)) then
+            // disp("S = []");
+            nextArgin = nextArgin + 1;
+        else
+            if type(argins(nextArgin)) == 1 then
+                [n1,n2] = size(argins(nextArgin));
+                if (n1 == 1 & n2 == 1) | (n1 == n & n2 == 1) | (n1 == 1 & n2 == n) then
+                    // disp("Size specified!");
+                    S = argins(nextArgin);
+                    if iscolumn(S) then
+                        S = S.';
+                    end
+                    nextArgin = nextArgin + 1;
+                else
+                    warning("S must be a scalar or a vector of the same length as X.");
+                    scanFailed = %T;
+                    return;
+                end
+            end
+        end
+    end
+
+    // check for color argument
+    // disp("check for color");
+    // disp(["nextArgin = " string(nextArgin)]);
+    C = [];
+    if  size(argins) >= nextArgin then
+        if isempty(argins(nextArgin)) then
+            // disp("C = []");
+            nextArgin = nextArgin + 1;
+        else
+            [n1,n2] = size(argins(nextArgin));
+            if type(argins(nextArgin)) == 1 then
+                if (n1 == n & n2 == 1) | (n1 == 1 & n2 == n) then
+                    // disp("Color vector specified!");
+                    C = scatterLinearColorMap(argins(nextArgin));
+                    nextArgin = nextArgin + 1;
+                elseif n1 == n & n2 == 3 then
+                    // disp("Color RGB matrix specified!");
+                    C = addcolor(argins(nextArgin));            
+                    nextArgin = nextArgin + 1;
+                else
+                    warning("C must be a vector or a matrix of the same length as X.");
+                    scanFailed = %T;
+                    return;
+                end
+                if iscolumn(C) then
+                    C = C.';
+                end
+            elseif type(argins(nextArgin)) == 10 then
+                if n1 == 1 & n2 == 1 then
+                    // check if string specifies a color
+                    colorRGB = name2rgb(argins(nextArgin));
+                    if ~isempty(colorRGB) then
+                        // disp("Single color string specified!");
+                        C = addcolor(colorRGB/255);
+                        nextArgin = nextArgin + 1;
+                    end        
+                elseif (n1 == n & n2 == 1) | (n1 == 1 & n2 == n) then
+                    C = addcolor(name2rgb(argins(nextArgin))/255);
+                    if isempty(C) then
+                        warning("Wrong color specified.");
+                        scanFailed = %T;
+                        return;
+                    else
+                         // disp("Color vector of strings specified!");
+                         nextArgin = nextArgin + 1;
+                    end
+                end
+            end
+        end
+    end
+
+    // check for "fill" argument
+    // disp("check for fill");
+    // disp(["nextArgin = " string(nextArgin)]);
+    fill = %F;
+    if  size(argins) >= nextArgin then
+        if type(argins(nextArgin)) == 10 then
+            if argins(nextArgin) == "fill" then
+                // disp("fill specified");
+                fill = %T;
+                nextArgin = nextArgin + 1;
+            end
+        end
+    end
+
+    // check for marker argument
+    markStyle = 9; // default circle
+    if  size(argins) >= nextArgin then
+        if type(argins(nextArgin)) == 10 then
+            ms = getMarkStyle(argins(nextArgin));
+            if ms >= 0 & ms <= 14 then
+                // disp(strcat(["marker " argins(nextArgin)]));
+                markStyle = ms;
+                nextArgin = nextArgin + 1;
+            end
+        end
+    end
+
+    // check for property-value pairs
+    // disp("check for property-value pairs");
+    // disp(["nextArgin = " string(nextArgin)]);
+    markFg = -1;
+    markBg = -1;
+    thickness = 1.0; // default
+    while  size(argins) >= nextArgin do
+        if size(argins) == nextArgin then
+            warning("Incorrect number of inputs for property-value pairs.");
+            scanFailed = %T;
+            return;
+        else
+            // disp(["nextArgin = " string(nextArgin)]);
+            select argins(nextArgin)
+            case "marker"
+                // disp("Property marker");
+                markStyle = getMarkStyle(argins(nextArgin+1));
+                if markStyle == -1 then
+                    warning(strcat([argins(nextArgin+1) " is not a valid value for property marker."]));
+                    scanFailed = %T;
+                    return;
+                end
+            case "markerStyle"
+                // disp("Property markerStyle");
+                markStyle = getMarkStyle(argin(nextArgin+1));
+                if markStyle == -1 then
+                    warning(strcat([argins(nextArgin+1) " is not a valid value for property markerStyle."]));
+                    scanFailed = %T;
+                    return;
+                end
+            case "markerEdgeColor"
+                // disp("Property markerEdgeColor");
+                markFg = colorIndex(argins(nextArgin+1));
+                if markFg == -1 then
+                    warning(strcat([argins(nextArgin+1) " is not a valid value for property markerEdgeColor."]));
+                    scanFailed = %T;
+                    return;
+                end;
+            case "markerForeground"
+                // disp("Property markerForeground");
+                markFg = colorIndex(argins(nextArgin+1));
+                if markFg == -1 then
+                    warning(strcat([argins(nextArgin+1) " is not a valid value for property markerForeground."]));
+                    scanFailed = %T;
+                    return;
+                end;
+            case "markerFaceColor"
+                // disp("Property markerFaceColor");
+                fill = %T;
+                markBg = colorIndex(argins(nextArgin+1));
+                if markBg == -1 then
+                    warning(strcat([argins(nextArgin+1) " is not a valid value for property markerFaceColor."]));
+                    scanFailed = %T;
+                    return;
+                end;
+            case "markerBackground"
+                // disp("Property markerBackground");
+                fill = %T;
+                markBg = colorIndex(argins(nextArgin+1));
+                if markBg == -1 then
+                    warning(strcat([argins(nextArgin+1) " is not a valid value for property markerBackground."]));
+                    scanFailed = %T;
+                    return;
+                end;
+            case "linewidth"
+                if type(argins(nextArgin+1)) == 1 then
+                    // disp("Property linewidth");
+                    thickness = argins(nextArgin+1);
+                else
+                    warning(strcat([argins(nextArgin+1) " is not a valid value for property linewidth."]));
+                    scanFailed = %T;
+                    return;
+                end 
+            case "thickness"
+                if type(argins(nextArgin+1)) == 1 then
+                    // disp("Property thickness");
+                    thickness = argins(nextArgin+1);
+                else
+                    warning(strcat([argins(nextArgin+1) " is not a valid value for property thickness."]));
+                    scanFailed = %T;
+                    return;
+                end
+            else
+                warning(strcat(["There is no " argin(nextArgin) " property on the Scatter class."]));
+                scanFailed = %T;
+                return;
+            end
+        end
+        nextArgin = nextArgin + 2;
+    end
+
+endfunction
+
+function colorInd = colorIndex(colorSpec)
+    colorInd = -1;
+    if type(colorSpec) == 10 & size(colorSpec) == [1 1] then
+        colorRGB = name2rgb(colorSpec);
+        if ~isempty(colorRGB) then
+            // disp("Single color string specified!");
+            colorInd = addcolor(colorRGB/255);
+            return;
+        end
+    elseif type(colorSpec) == 1 & (size(colorSpec) == [1 3] | size(colorSpec) == [3 1]) then
+        // disp("Color RGB triple specified!");
+        colorInd = addcolor(colorSpec);
+        return; 
+    end
+    warning("Specified string is an invalid color value.");
+endfunction
+
+function markStyle = getMarkStyle(name)
+    if type(name) ~= 10 then
+        markStyle = -1;
+    else
+        select name
+        case "."
+            markStyle = 0;
+        case "+"
+            markStyle = 1;
+        case "x"
+            markStyle = 2;
+        case "circle plus"
+            markStyle = 3;
+        case "filled diamond"
+            markStyle = 4;
+        case "d"
+            markStyle = 5;
+        case "diamond"
+            markStyle = 5;
+        case "^"
+            markStyle = 6;
+        case "v"
+            markStyle = 7;
+        case "diamond plus"
+            markStyle = 8;
+        case "o"
+            markStyle = 9;
+        case "*"
+            markStyle = 10;
+        case "s"
+            markStyle = 11;
+        case "square"
+            markStyle = 11;
+        case ">"
+            markStyle = 12;
+        case "<"
+            markStyle = 13;
+        case "p"
+            markStyle = 14;
+        case "pentagram"
+            markStyle = 14;
+        else
+            markStyle = -1;
+        end
+    end
+endfunction
+
+function colorIndex = scatterLinearColorMap(colorValue)
+    cMin = min(colorValue);
+    cMax = max(colorValue);
+    cmap = get(gcf(),"color_map");
+    numColors = size(cmap,1);
+    if (cMax-cMin > %eps) then
+        colorIndex = (numColors-1)*(colorValue - cMin)/(cMax - cMin) + 1;
+    else
+        colorIndex = 1; // default color index
+    end
+endfunction
diff --git a/scilab/modules/graphics/macros/scatterSetPoyline.sci b/scilab/modules/graphics/macros/scatterSetPoyline.sci
new file mode 100644 (file)
index 0000000..bc38646
--- /dev/null
@@ -0,0 +1,84 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Scilab Enterprises - 2015 - 2012 - Juergen Koch <juergen.koch@hs-esslingen.de>
+// 
+// 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
+
+function scatterSetPoyline(polyLine,S,C,thickness,markStyle,markFg,markBg,fill)
+
+    // disp(strcat(["S = " string(S)]));
+    // disp(strcat(["C = " string(C)]));
+    // disp(strcat(["thickness = " string(thickness)]));
+    // disp(strcat(["markStyle = " string(markStyle)]));
+    // disp(strcat(["markFg = " string(markFg)]));
+    // disp(strcat(["markBg = " string(markBg)]));
+    // disp(strcat(["fill = " string(fill)]));
+
+    
+    // set mark mode
+    polyLine.line_mode = "off";
+    polyLine.mark_mode = "on";
+
+    // set thickness
+    polyLine.thickness = thickness;
+
+    // set mark style
+    // disp(markStyle);
+    polyLine.mark_style = markStyle;
+
+    // set mark size
+    polyLine.mark_size_unit = "point";
+    if isempty(S) then
+        polyLine.mark_size = 7;
+    else
+        if size(S) == [1 1] then
+            polyLine.mark_size = ceil(sqrt(4*S/%pi))
+        else
+            polyLine.mark_size = 7;
+            disp("handle of different sizes not yet implemented!");
+            //
+            // ToDo: handle different sizes
+            //
+        end
+    end
+
+   // set mark foreground and background color
+    if isempty(C) then
+        if markFg == -1 then
+            markFg = addcolor(name2rgb("blue")/255); // default
+        end
+        if markBg == -1 then
+            markBg = markFg;
+        end
+        polyLine.mark_foreground = markFg;
+        if fill == %T then
+            polyLine.mark_background = markBg;
+        else
+            polyLine.mark_background = 0; // transparent
+        end
+    else
+        if size(C) == [1 1] then
+            polyLine.mark_foreground = C; 
+            if fill == %T then
+                polyLine.mark_background = C;
+            else
+                polyLine.mark_background = 0; // transparent
+            end
+        else
+            polyLine.colors = C;
+            polyLine.mark_foreground = -3;
+            if fill == %T then
+                polyLine.mark_background = -3;
+            else
+                polyLine.mark_background = 0; // transparent
+            end
+        end
+    end
+
+    // disp(polyLine);
+
+endfunction
+
diff --git a/scilab/modules/helptools/images/scatter3_1.png b/scilab/modules/helptools/images/scatter3_1.png
new file mode 100644 (file)
index 0000000..bd0f5d5
Binary files /dev/null and b/scilab/modules/helptools/images/scatter3_1.png differ
diff --git a/scilab/modules/helptools/images/scatter3_2.png b/scilab/modules/helptools/images/scatter3_2.png
new file mode 100644 (file)
index 0000000..bd0f5d5
Binary files /dev/null and b/scilab/modules/helptools/images/scatter3_2.png differ
diff --git a/scilab/modules/helptools/images/scatter3_3.png b/scilab/modules/helptools/images/scatter3_3.png
new file mode 100644 (file)
index 0000000..646da6d
Binary files /dev/null and b/scilab/modules/helptools/images/scatter3_3.png differ
diff --git a/scilab/modules/helptools/images/scatter3_4.png b/scilab/modules/helptools/images/scatter3_4.png
new file mode 100644 (file)
index 0000000..20cc9c7
Binary files /dev/null and b/scilab/modules/helptools/images/scatter3_4.png differ
diff --git a/scilab/modules/helptools/images/scatter3_5.png b/scilab/modules/helptools/images/scatter3_5.png
new file mode 100644 (file)
index 0000000..11f3879
Binary files /dev/null and b/scilab/modules/helptools/images/scatter3_5.png differ
diff --git a/scilab/modules/helptools/images/scatter3_6.png b/scilab/modules/helptools/images/scatter3_6.png
new file mode 100644 (file)
index 0000000..421e74f
Binary files /dev/null and b/scilab/modules/helptools/images/scatter3_6.png differ
diff --git a/scilab/modules/helptools/images/scatter3_7.png b/scilab/modules/helptools/images/scatter3_7.png
new file mode 100644 (file)
index 0000000..95e122d
Binary files /dev/null and b/scilab/modules/helptools/images/scatter3_7.png differ
diff --git a/scilab/modules/helptools/images/scatter3_8.png b/scilab/modules/helptools/images/scatter3_8.png
new file mode 100644 (file)
index 0000000..bd0f5d5
Binary files /dev/null and b/scilab/modules/helptools/images/scatter3_8.png differ
diff --git a/scilab/modules/helptools/images/scatter3_9.png b/scilab/modules/helptools/images/scatter3_9.png
new file mode 100644 (file)
index 0000000..1207d89
Binary files /dev/null and b/scilab/modules/helptools/images/scatter3_9.png differ
diff --git a/scilab/modules/helptools/images/scatter_1.png b/scilab/modules/helptools/images/scatter_1.png
new file mode 100644 (file)
index 0000000..d88b9d7
Binary files /dev/null and b/scilab/modules/helptools/images/scatter_1.png differ
diff --git a/scilab/modules/helptools/images/scatter_2.png b/scilab/modules/helptools/images/scatter_2.png
new file mode 100644 (file)
index 0000000..2aa6f9d
Binary files /dev/null and b/scilab/modules/helptools/images/scatter_2.png differ
diff --git a/scilab/modules/helptools/images/scatter_3.png b/scilab/modules/helptools/images/scatter_3.png
new file mode 100644 (file)
index 0000000..1438915
Binary files /dev/null and b/scilab/modules/helptools/images/scatter_3.png differ
diff --git a/scilab/modules/helptools/images/scatter_4.png b/scilab/modules/helptools/images/scatter_4.png
new file mode 100644 (file)
index 0000000..aeb6ea7
Binary files /dev/null and b/scilab/modules/helptools/images/scatter_4.png differ
diff --git a/scilab/modules/helptools/images/scatter_5.png b/scilab/modules/helptools/images/scatter_5.png
new file mode 100644 (file)
index 0000000..0692928
Binary files /dev/null and b/scilab/modules/helptools/images/scatter_5.png differ
diff --git a/scilab/modules/helptools/images/scatter_6.png b/scilab/modules/helptools/images/scatter_6.png
new file mode 100644 (file)
index 0000000..443a159
Binary files /dev/null and b/scilab/modules/helptools/images/scatter_6.png differ
diff --git a/scilab/modules/helptools/images/scatter_7.png b/scilab/modules/helptools/images/scatter_7.png
new file mode 100644 (file)
index 0000000..2e39869
Binary files /dev/null and b/scilab/modules/helptools/images/scatter_7.png differ
diff --git a/scilab/modules/helptools/images/scatter_8.png b/scilab/modules/helptools/images/scatter_8.png
new file mode 100644 (file)
index 0000000..ccea11a
Binary files /dev/null and b/scilab/modules/helptools/images/scatter_8.png differ
diff --git a/scilab/modules/helptools/images/scatter_9.png b/scilab/modules/helptools/images/scatter_9.png
new file mode 100644 (file)
index 0000000..a2f0f5c
Binary files /dev/null and b/scilab/modules/helptools/images/scatter_9.png differ