scatter with extended polyline properties mark_size, mark_foreground, mark_background 73/16673/4
Juergen KOCH [Thu, 11 Jun 2015 12:25:22 +0000 (14:25 +0200)]
Change-Id: I266373e8d3b0cd99f8eead0be674e46f52b9146f

60 files changed:
scilab/CHANGES_5.6.X
scilab/modules/graphic_objects/includes/graphicObjectProperties.h
scilab/modules/graphic_objects/src/cpp/PolylineDecomposer.cpp
scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/contouredObject/ContouredObject.java
scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/contouredObject/Mark.java
scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/graphicObject/GraphicObjectProperties.java
scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/polyline/Polyline.java
scilab/modules/graphic_objects/src/scripts/propertiesMap.properties
scilab/modules/graphics/Makefile.am
scilab/modules/graphics/Makefile.in
scilab/modules/graphics/graphics.vcxproj
scilab/modules/graphics/graphics.vcxproj.filters
scilab/modules/graphics/help/en_US/2d_plot/scatter.xml
scilab/modules/graphics/help/en_US/3d_plot/scatter3.xml [moved from scilab/modules/graphics/help/en_US/2d_plot/scatter3.xml with 96% similarity]
scilab/modules/graphics/help/en_US/color_management/name2rgb.xml
scilab/modules/graphics/includes/SetProperty.h
scilab/modules/graphics/macros/%h_p.sci
scilab/modules/graphics/macros/scatter.sci
scilab/modules/graphics/macros/scatter3.sci
scilab/modules/graphics/macros/scatterScanVargin.sci
scilab/modules/graphics/macros/scatterSetPolyline.sci
scilab/modules/graphics/src/c/SetProperty.c
scilab/modules/graphics/src/c/getHandleProperty/GetHashTable.c
scilab/modules/graphics/src/c/getHandleProperty/SetHashTable.c
scilab/modules/graphics/src/c/getHandleProperty/getHandleProperty.h
scilab/modules/graphics/src/c/getHandleProperty/get_mark_background_property.c
scilab/modules/graphics/src/c/getHandleProperty/get_mark_foreground_property.c
scilab/modules/graphics/src/c/getHandleProperty/get_mark_size_property.c
scilab/modules/graphics/src/c/getHandleProperty/get_sizes_property.c [deleted file]
scilab/modules/graphics/src/c/getHandleProperty/setHandleProperty.h
scilab/modules/graphics/src/c/getHandleProperty/set_mark_background_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_mark_foreground_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_mark_size_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_sizes_property.c [deleted file]
scilab/modules/graphics/tests/unit_tests/scatter.dia.ref [new file with mode: 0644]
scilab/modules/graphics/tests/unit_tests/scatter.tst [new file with mode: 0644]
scilab/modules/graphics/tests/unit_tests/scatter3.dia.ref [new file with mode: 0644]
scilab/modules/graphics/tests/unit_tests/scatter3.tst [new file with mode: 0644]
scilab/modules/helptools/etc/images_md5.txt
scilab/modules/helptools/images/scatter3_1.png
scilab/modules/helptools/images/scatter3_2.png
scilab/modules/helptools/images/scatter3_3.png
scilab/modules/helptools/images/scatter3_4.png
scilab/modules/helptools/images/scatter3_5.png
scilab/modules/helptools/images/scatter3_6.png
scilab/modules/helptools/images/scatter3_7.png
scilab/modules/helptools/images/scatter3_8.png
scilab/modules/helptools/images/scatter3_9.png
scilab/modules/helptools/images/scatter_1.png
scilab/modules/helptools/images/scatter_2.png
scilab/modules/helptools/images/scatter_3.png
scilab/modules/helptools/images/scatter_4.png
scilab/modules/helptools/images/scatter_5.png
scilab/modules/helptools/images/scatter_6.png
scilab/modules/helptools/images/scatter_7.png
scilab/modules/helptools/images/scatter_8.png
scilab/modules/helptools/images/scatter_9.png
scilab/modules/io/macros/%_save.sci
scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/DrawerVisitor.java
scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/mark/MarkSpriteManager.java

index 9b3e671..69698d3 100644 (file)
@@ -1,13 +1,10 @@
-                     Changes between version 5.5.1 and 5.6.0
+                     Changes between version 5.5.2 and 5.6.0
                      =======================================
 
 New Features
 =============
 
-* scatter plot with different mark colors is now available:
-  TODO : save/load+display+doc of new properties
-
-* name2rgb can now handle a single string and a matrix of strings.
+* scatter/scatter3 plot with different mark colors is now available.
 
 
 Compilation
@@ -15,3 +12,9 @@ Compilation
 
 * --without-xcos now only disable Xcos compilation. Xcos Graphic interface is disabled
 using --without-gui.
+
+
+Scilab Bug Fixes
+================
+
+* Bug #6064 fixed - scatter function did not exist in Scilab.
index 6402ff0..3a22fd8 100755 (executable)
 #define __GO_UI_FRAME_BORDER_TYPE__ 392
 #define __GO_UI_SCROLLABLE__ 393
 #define __GO_COLOR_SET__ 394
-#define __GO_SIZES__ 395
-#define __GO_NUM_SIZES__ 396
+#define __GO_MARK_SIZES__ 395
+#define __GO_NUM_MARK_SIZES__ 396
+#define __GO_MARK_FOREGROUNDS__ 397
+#define __GO_NUM_MARK_FOREGROUNDS__ 398
+#define __GO_MARK_BACKGROUNDS__ 399
+#define __GO_NUM_MARK_BACKGROUNDS__ 400
 
 #endif /* !__GRAPHIC_OBJECT_PROPERTIES_H__ */
index 1e07033..f238614 100644 (file)
@@ -764,9 +764,33 @@ void PolylineDecomposer::fillColors(int id, float* buffer, int bufferLength, int
         int * piNumColors = &numColors;
         int min;
 
-        getGraphicObjectProperty(id, __GO_DATA_MODEL_NUM_COLORS__, jni_int, (void**) &piNumColors);
-        getGraphicObjectProperty(id, __GO_DATA_MODEL_COLORS__, jni_int_vector, (void**) &colors);
-        if (!colors)
+               getGraphicObjectProperty(id, __GO_DATA_MODEL_NUM_COLORS__, jni_int, (void**) &piNumColors);
+               if (numColors > 0) 
+               {
+               getGraphicObjectProperty(id, __GO_DATA_MODEL_COLORS__, jni_int_vector, (void**) &colors);
+               }
+
+               if (numColors == 0 || colors == NULL)
+               {
+                       // try to load mark background colors 
+                       getGraphicObjectProperty(id, __GO_NUM_MARK_BACKGROUNDS__, jni_int, (void**) &piNumColors);
+                       if (numColors > 0) 
+                       {
+                           getGraphicObjectProperty(id, __GO_MARK_BACKGROUNDS__, jni_int_vector, (void**) &colors);
+                       }
+               }
+
+               if (numColors == 0 || colors == NULL)
+               {
+                       // try to load mark foreground colors 
+                       getGraphicObjectProperty(id, __GO_NUM_MARK_FOREGROUNDS__, jni_int, (void**) &piNumColors);
+                       if (numColors > 0) 
+                       {
+                           getGraphicObjectProperty(id, __GO_MARK_FOREGROUNDS__, jni_int_vector, (void**) &colors);
+                       }
+               }
+
+               if (!colors)
         {
             buffer[bufferOffset + 3] = 1.0;
         }
index a249d5d..2e0520f 100644 (file)
@@ -27,7 +27,7 @@ import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProp
  */
 public abstract class ContouredObject extends GraphicObject {
     /** ContouredObject properties */
-    public enum ContouredObjectPropertyType { LINE, FILLMODE, BACKGROUND, MARK, MARK_OFFSET, MARK_STRIDE, SELECTED };
+    public enum ContouredObjectPropertyType { LINE, FILLMODE, BACKGROUND, MARK, MARK_OFFSET, MARK_STRIDE, MARK_SIZES, NUM_MARK_SIZES, MARK_FOREGROUNDS, NUM_MARK_FOREGROUNDS, MARK_BACKGROUNDS, NUM_MARK_BACKGROUNDS, SELECTED };
 
     /** Line property */
     private Line line;
@@ -46,6 +46,27 @@ public abstract class ContouredObject extends GraphicObject {
 
     private boolean selected;
     private final Integer selectedColor = new Integer(-3);
+    
+    /** Mark sizes
+     *  The class Mark only handles a single size.
+     *  The mark_sizes array is used to handle different sizes for the marks.
+     *  The mark_sizes array is empty in case of a single size.  
+     *  */
+    private Integer[] mark_sizes;
+
+    /** Mark foreground colors
+     *  The class Mark only handles a single foreground color.
+     *  The mark_foregrounds array is used to handle different foreground colors for the marks.
+     *  The mark_foregrounds array is empty in case of a single color. 
+     *  */
+    private Integer[] mark_foregrounds;
+
+    /** Mark background colors
+     *  The class Mark only handles a single background color.
+     *  The mark_backgrounds array is used to handle different background colors for the marks.
+     *  The mark_backgrounds array is empty in case of a single color. 
+     *  */
+    private Integer[] mark_backgrounds;
 
     /** Default constructor */
     public ContouredObject() {
@@ -56,6 +77,9 @@ public abstract class ContouredObject extends GraphicObject {
         offset = 0;
         stride = 1;
         selected = false;
+        mark_sizes = new Integer[0];
+        mark_foregrounds = new Integer[0];
+        mark_backgrounds = new Integer[0];
     }
 
     public ContouredObject clone() {
@@ -63,6 +87,9 @@ public abstract class ContouredObject extends GraphicObject {
 
         copy.line = new Line(line);
         copy.mark = new Mark(mark);
+        copy.mark_sizes = mark_sizes; 
+        copy.mark_foregrounds = mark_foregrounds;
+        copy.mark_backgrounds = mark_backgrounds; 
 
         return copy;
     }
@@ -98,10 +125,22 @@ public abstract class ContouredObject extends GraphicObject {
                 return MarkPropertyType.SIZEUNIT;
             case __GO_MARK_SIZE__ :
                 return MarkPropertyType.SIZE;
+            case __GO_MARK_SIZES__ :
+                return ContouredObjectPropertyType.MARK_SIZES;
+            case __GO_NUM_MARK_SIZES__ :
+                return ContouredObjectPropertyType.NUM_MARK_SIZES;
             case __GO_MARK_FOREGROUND__ :
                 return MarkPropertyType.FOREGROUND;
+            case __GO_MARK_FOREGROUNDS__ :
+                return ContouredObjectPropertyType.MARK_FOREGROUNDS;
+            case __GO_NUM_MARK_FOREGROUNDS__ :
+                return ContouredObjectPropertyType.NUM_MARK_FOREGROUNDS;
             case __GO_MARK_BACKGROUND__ :
                 return MarkPropertyType.BACKGROUND;
+            case __GO_MARK_BACKGROUNDS__ :
+                return ContouredObjectPropertyType.MARK_BACKGROUNDS;
+            case __GO_NUM_MARK_BACKGROUNDS__ :
+                return ContouredObjectPropertyType.NUM_MARK_BACKGROUNDS;
             case __GO_MARK_OFFSET__ :
                 return ContouredObjectPropertyType.MARK_OFFSET;
             case __GO_MARK_STRIDE__ :
@@ -143,10 +182,22 @@ public abstract class ContouredObject extends GraphicObject {
             return getMarkSizeUnit();
         } else if (property == MarkPropertyType.SIZE) {
             return getMarkSize();
+        } else if (property == ContouredObjectPropertyType.MARK_SIZES) {
+            return getMarkSizes();
+        } else if (property == ContouredObjectPropertyType.NUM_MARK_SIZES) {
+            return getNumMarkSizes();
         } else if (property == MarkPropertyType.FOREGROUND) {
             return getMarkForeground();
+        } else if (property == ContouredObjectPropertyType.MARK_FOREGROUNDS) {
+            return getMarkForegrounds();
+        } else if (property == ContouredObjectPropertyType.NUM_MARK_FOREGROUNDS) {
+            return getNumMarkForegrounds();
         } else if (property == MarkPropertyType.BACKGROUND) {
             return getMarkBackground();
+        } else if (property == ContouredObjectPropertyType.MARK_BACKGROUNDS) {
+            return getMarkBackgrounds();
+        } else if (property == ContouredObjectPropertyType.NUM_MARK_BACKGROUNDS) {
+            return getNumMarkBackgrounds();
         } else if (property == ContouredObjectPropertyType.MARK_OFFSET) {
             return getMarkOffset();
         } else if (property == ContouredObjectPropertyType.MARK_STRIDE) {
@@ -189,10 +240,16 @@ public abstract class ContouredObject extends GraphicObject {
             setMarkSizeUnit((Integer) value);
         } else if (property == MarkPropertyType.SIZE) {
             return setMarkSize((Integer) value);
+        } else if (property == ContouredObjectPropertyType.MARK_SIZES) {
+            return setMarkSizes((Integer []) value);
         } else if (property == MarkPropertyType.FOREGROUND) {
             this.setMarkForeground((Integer) value);
+        } else if (property == ContouredObjectPropertyType.MARK_FOREGROUNDS) {
+            return setMarkForegrounds((Integer []) value);
         } else if (property == MarkPropertyType.BACKGROUND) {
             this.setMarkBackground((Integer) value);
+        } else if (property == ContouredObjectPropertyType.MARK_BACKGROUNDS) {
+            return setMarkBackgrounds((Integer []) value);
         } else if (property == ContouredObjectPropertyType.MARK_OFFSET) {
             this.setMarkOffset((Integer) value);
         } else if (property == ContouredObjectPropertyType.MARK_STRIDE) {
@@ -412,7 +469,10 @@ public abstract class ContouredObject extends GraphicObject {
      * @param mark the mark to set
      */
     public UpdateStatus setMark(Mark mark) {
-        this.mark = mark;
+       mark_sizes = new Integer[0];
+       mark_foregrounds = new Integer[0];
+       mark_backgrounds = new Integer[0];
+       this.mark = mark;
         return UpdateStatus.Success;
     }
 
@@ -425,15 +485,42 @@ public abstract class ContouredObject extends GraphicObject {
     }
 
     /**
+     * Get the mark backgrounds
+     * @return the background colors
+     */
+    public Integer[] getMarkBackgrounds() {
+        return mark_backgrounds;
+    }
+
+    /**
+     * Get the number of mark backgrounds
+     * @return the number of background colors
+     */
+    public int getNumMarkBackgrounds() {
+        return mark_backgrounds.length;
+    }
+
+    /**
      * Set the mark background
      * @param background the background to set
      */
     public UpdateStatus setMarkBackground(Integer background) {
+       mark_backgrounds = new Integer[0];
         mark.setBackground(background);
         return UpdateStatus.Success;
     }
 
     /**
+     * Set the mark backgrounds
+     * @param backgrounds the background colors to set
+     */
+    public UpdateStatus setMarkBackgrounds(Integer[] backgrounds) {
+               mark_backgrounds = backgrounds;
+        mark.setBackground(-3);
+       return UpdateStatus.Success;
+    }
+
+    /**
      * Get the mark foreground
      * @return the foreground
      */
@@ -442,15 +529,42 @@ public abstract class ContouredObject extends GraphicObject {
     }
 
     /**
+     * Get the mark foregrounds
+     * @return the foreground colors
+     */
+    public Integer[] getMarkForegrounds() {
+        return mark_foregrounds;
+    }
+
+    /**
+     * Get the number of mark foregrounds
+     * @return the number of foreground colors
+     */
+    public int getNumMarkForegrounds() {
+        return mark_foregrounds.length;
+    }
+
+    /**
      * Set the mark foreground
      * @param foreground the foreground to set
      */
     public UpdateStatus setMarkForeground(Integer foreground) {
+       mark_foregrounds = new Integer[0];
         mark.setForeground(foreground);
         return UpdateStatus.Success;
     }
 
     /**
+     * Set the mark foregrounds
+     * @param foregrounds the foreground colors to set
+     */
+    public UpdateStatus setMarkForegrounds(Integer[] foregrounds) {
+               mark_foregrounds = foregrounds;
+        mark.setForeground(-3);
+       return UpdateStatus.Success;
+    }
+
+    /**
      * Get the mark size unit
      * @return the markSizeUnit
      */
@@ -493,11 +607,37 @@ public abstract class ContouredObject extends GraphicObject {
     }
 
     /**
+     * Get the mark sizes
+     * @return the sizes
+     */
+    public Integer[] getMarkSizes() {
+        return mark_sizes;
+    }
+
+    /**
+     * Get the number of mark sizes
+     * @return the number of sizes
+     */
+    public int getNumMarkSizes() {
+        return mark_sizes.length;
+    }
+
+    /**
      * Set the mark size
      * @param size the size to set
      */
     public UpdateStatus setMarkSize(Integer size) {
-        return mark.setSize(size);
+       mark_sizes = new Integer[0];
+       return mark.setSize(size);
+    }
+    /**
+     * Set the mark sizes
+     * @param sizes the sizes to set
+     */
+    public UpdateStatus setMarkSizes(Integer[] sizes) {
+               mark_sizes = sizes;
+       return UpdateStatus.Success;
     }
 
     /**
index 3aa1e69..b1e3d9d 100644 (file)
@@ -68,6 +68,7 @@ public class Mark {
         mode = false;
         style = 0;
         markSizeUnit = MarkSizeUnitType.POINT;
+        size = 0;
         foreground = 0;
         background = 0;
     }
index 3a73277..035bd5f 100755 (executable)
@@ -416,7 +416,11 @@ public class GraphicObjectProperties {
     public static final int __GO_UI_FRAME_BORDER_TYPE__ = 392;
     public static final int __GO_UI_SCROLLABLE__ = 393;
     public static final int __GO_COLOR_SET__ = 394;
-    public static final int __GO_SIZES__ = 395;
-    public static final int __GO_NUM_SIZES__ = 396;
+    public static final int __GO_MARK_SIZES__ = 395;
+    public static final int __GO_NUM_MARK_SIZES__ = 396;
+    public static final int __GO_MARK_FOREGROUNDS__ = 397;
+    public static final int __GO_NUM_MARK_FOREGROUNDS__ = 398;
+    public static final int __GO_MARK_BACKGROUNDS__ = 399;
+    public static final int __GO_NUM_MARK_BACKGROUNDS__ = 400;
 
 }
index 07c0c47..b434f7c 100644 (file)
@@ -27,8 +27,6 @@ import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProp
 import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_Y_SHIFT__;
 import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_Z_SHIFT__;
 import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_COLOR_SET__;
-import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_SIZES__;
-import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_NUM_SIZES__;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -54,7 +52,7 @@ public class Polyline extends ClippableContouredObject {
     private enum PolylineProperty { CLOSED, ARROWSIZEFACTOR, POLYLINESTYLE,
                                     INTERPCOLORVECTOR, INTERPCOLORVECTORSET, INTERPCOLORMODE,
                                     XSHIFT, YSHIFT, ZSHIFT, BARWIDTH, DATATIPS, DATATIPSCOUNT,
-                                    TIP_DISPLAY_FNC, TIP_MARK, COLORSET, SIZESET, SIZESETCOUNT
+                                    TIP_DISPLAY_FNC, TIP_MARK, COLORSET
                                   };
 
     /** Specifies whether the polyline is closed */
@@ -98,9 +96,6 @@ public class Polyline extends ClippableContouredObject {
     /** has color set */
     private boolean colorSet;
 
-    /** sizes objects list */
-    private List<Integer> sizes;
-
     /** Constructor */
     public Polyline() {
         super();
@@ -118,7 +113,6 @@ public class Polyline extends ClippableContouredObject {
         displayFnc = "";
         tipMark = 11;
         colorSet = false;
-        sizes = new ArrayList<Integer>();
     }
 
     @Override
@@ -163,10 +157,6 @@ public class Polyline extends ClippableContouredObject {
                 return PolylineProperty.TIP_MARK;
             case __GO_COLOR_SET__ :
                 return PolylineProperty.COLORSET;
-            case __GO_SIZES__ :
-                return PolylineProperty.SIZESET;
-            case __GO_NUM_SIZES__ :
-                return PolylineProperty.SIZESETCOUNT;
             default :
                 return super.getPropertyFromName(propertyName);
         }
@@ -210,10 +200,6 @@ public class Polyline extends ClippableContouredObject {
                     return getTipMark();
                 case COLORSET:
                     return getColorSet();
-                case SIZESET:
-                    return getSizeSet();
-                case SIZESETCOUNT:
-                    return sizes.size();
             }
         }
         return super.getProperty(property);
@@ -268,9 +254,6 @@ public class Polyline extends ClippableContouredObject {
                     case COLORSET:
                         setColorSet((Boolean) value);
                         break;
-                    case SIZESET:
-                        setSizeSet((Integer[]) value);
-                        break;
                 }
             }
             return super.setProperty(property, value);
@@ -515,29 +498,6 @@ public class Polyline extends ClippableContouredObject {
     }
 
     /**
-     * @return sizes
-     */
-    public Integer[] getSizeSet() {
-        return sizes.toArray(new Integer[sizes.size()]);
-    }
-
-    /**
-     * @param sizes the sizes to set
-     */
-    private UpdateStatus setSizeSet(List<Integer> sizes) {
-        this.sizes = sizes;
-        return UpdateStatus.Success;
-    }
-
-    /**
-     * @param sizes the sizes to set
-     */
-    public UpdateStatus setSizeSet(Integer[] sizes) {
-        this.sizes = new LinkedList<Integer>(Arrays.asList(sizes));
-        return UpdateStatus.Success;
-    }
-
-    /**
      * @return Type as String
      */
     public Integer getType() {
index 86c83ab..e9b1bc8 100755 (executable)
@@ -445,5 +445,9 @@ __GO_UI_TITLE_SCROLL__
 __GO_UI_FRAME_BORDER_TYPE__
 __GO_UI_SCROLLABLE__
 __GO_COLOR_SET__
-__GO_SIZES__
-__GO_NUM_SIZES__
+__GO_MARK_SIZES__
+__GO_NUM_MARK_SIZES__
+__GO_MARK_FOREGROUNDS__
+__GO_NUM_MARK_FOREGROUNDS__
+__GO_MARK_BACKGROUNDS__
+__GO_NUM_MARK_BACKGROUNDS__
index 7087d12..d3df5e5 100644 (file)
@@ -350,8 +350,6 @@ src/c/getHandleProperty/get_line_width_property.c \
 src/c/getHandleProperty/set_line_width_property.c \
 src/c/getHandleProperty/set_colors_property.c \
 src/c/getHandleProperty/get_colors_property.c \
-src/c/getHandleProperty/set_sizes_property.c \
-src/c/getHandleProperty/get_sizes_property.c \
 src/c/DefaultCommandArg.c \
 src/c/Axes.c \
 src/c/sciMatrix.c \
index 1ba99dd..6fbd0c8 100644 (file)
@@ -497,8 +497,6 @@ am__objects_1 = src/c/libscigraphics_algo_la-GetCommandArg.lo \
        src/c/getHandleProperty/libscigraphics_algo_la-set_line_width_property.lo \
        src/c/getHandleProperty/libscigraphics_algo_la-set_colors_property.lo \
        src/c/getHandleProperty/libscigraphics_algo_la-get_colors_property.lo \
-       src/c/getHandleProperty/libscigraphics_algo_la-set_sizes_property.lo \
-       src/c/getHandleProperty/libscigraphics_algo_la-get_sizes_property.lo \
        src/c/libscigraphics_algo_la-DefaultCommandArg.lo \
        src/c/libscigraphics_algo_la-Axes.lo \
        src/c/libscigraphics_algo_la-sciMatrix.lo \
@@ -1328,8 +1326,6 @@ src/c/getHandleProperty/get_line_width_property.c \
 src/c/getHandleProperty/set_line_width_property.c \
 src/c/getHandleProperty/set_colors_property.c \
 src/c/getHandleProperty/get_colors_property.c \
-src/c/getHandleProperty/set_sizes_property.c \
-src/c/getHandleProperty/get_sizes_property.c \
 src/c/DefaultCommandArg.c \
 src/c/Axes.c \
 src/c/sciMatrix.c \
@@ -2670,12 +2666,6 @@ src/c/getHandleProperty/libscigraphics_algo_la-set_colors_property.lo:  \
 src/c/getHandleProperty/libscigraphics_algo_la-get_colors_property.lo:  \
        src/c/getHandleProperty/$(am__dirstamp) \
        src/c/getHandleProperty/$(DEPDIR)/$(am__dirstamp)
-src/c/getHandleProperty/libscigraphics_algo_la-set_sizes_property.lo:  \
-       src/c/getHandleProperty/$(am__dirstamp) \
-       src/c/getHandleProperty/$(DEPDIR)/$(am__dirstamp)
-src/c/getHandleProperty/libscigraphics_algo_la-get_sizes_property.lo:  \
-       src/c/getHandleProperty/$(am__dirstamp) \
-       src/c/getHandleProperty/$(DEPDIR)/$(am__dirstamp)
 src/c/libscigraphics_algo_la-DefaultCommandArg.lo:  \
        src/c/$(am__dirstamp) src/c/$(DEPDIR)/$(am__dirstamp)
 src/c/libscigraphics_algo_la-Axes.lo: src/c/$(am__dirstamp) \
@@ -3262,7 +3252,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-get_screen_position_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-get_scrollable_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-get_segs_color_property.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-get_sizes_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-get_specular_color_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-get_sub_tics_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-get_surface_color_property.Plo@am__quote@
@@ -3430,7 +3419,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-set_screen_position_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-set_scrollable_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-set_segs_color_property.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-set_sizes_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-set_specular_color_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-set_sub_tics_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-set_surface_color_property.Plo@am__quote@
@@ -5775,20 +5763,6 @@ src/c/getHandleProperty/libscigraphics_algo_la-get_colors_property.lo: src/c/get
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/getHandleProperty/libscigraphics_algo_la-get_colors_property.lo `test -f 'src/c/getHandleProperty/get_colors_property.c' || echo '$(srcdir)/'`src/c/getHandleProperty/get_colors_property.c
 
-src/c/getHandleProperty/libscigraphics_algo_la-set_sizes_property.lo: src/c/getHandleProperty/set_sizes_property.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/getHandleProperty/libscigraphics_algo_la-set_sizes_property.lo -MD -MP -MF src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-set_sizes_property.Tpo -c -o src/c/getHandleProperty/libscigraphics_algo_la-set_sizes_property.lo `test -f 'src/c/getHandleProperty/set_sizes_property.c' || echo '$(srcdir)/'`src/c/getHandleProperty/set_sizes_property.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-set_sizes_property.Tpo src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-set_sizes_property.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/c/getHandleProperty/set_sizes_property.c' object='src/c/getHandleProperty/libscigraphics_algo_la-set_sizes_property.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/getHandleProperty/libscigraphics_algo_la-set_sizes_property.lo `test -f 'src/c/getHandleProperty/set_sizes_property.c' || echo '$(srcdir)/'`src/c/getHandleProperty/set_sizes_property.c
-
-src/c/getHandleProperty/libscigraphics_algo_la-get_sizes_property.lo: src/c/getHandleProperty/get_sizes_property.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/getHandleProperty/libscigraphics_algo_la-get_sizes_property.lo -MD -MP -MF src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-get_sizes_property.Tpo -c -o src/c/getHandleProperty/libscigraphics_algo_la-get_sizes_property.lo `test -f 'src/c/getHandleProperty/get_sizes_property.c' || echo '$(srcdir)/'`src/c/getHandleProperty/get_sizes_property.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-get_sizes_property.Tpo src/c/getHandleProperty/$(DEPDIR)/libscigraphics_algo_la-get_sizes_property.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/c/getHandleProperty/get_sizes_property.c' object='src/c/getHandleProperty/libscigraphics_algo_la-get_sizes_property.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/getHandleProperty/libscigraphics_algo_la-get_sizes_property.lo `test -f 'src/c/getHandleProperty/get_sizes_property.c' || echo '$(srcdir)/'`src/c/getHandleProperty/get_sizes_property.c
-
 src/c/libscigraphics_algo_la-DefaultCommandArg.lo: src/c/DefaultCommandArg.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libscigraphics_algo_la-DefaultCommandArg.lo -MD -MP -MF src/c/$(DEPDIR)/libscigraphics_algo_la-DefaultCommandArg.Tpo -c -o src/c/libscigraphics_algo_la-DefaultCommandArg.lo `test -f 'src/c/DefaultCommandArg.c' || echo '$(srcdir)/'`src/c/DefaultCommandArg.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libscigraphics_algo_la-DefaultCommandArg.Tpo src/c/$(DEPDIR)/libscigraphics_algo_la-DefaultCommandArg.Plo
index 0641f33..1cde132 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
     <ProjectConfiguration Include="Debug|Win32">
@@ -241,6 +241,7 @@ lib /DEF:"$(ProjectDir)elementary_functions_f_Import.def" /SUBSYSTEM:WINDOWS /MA
     <ClCompile Include="src\c\getHandleProperty\get_bar_layout_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_bar_width_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_border_property.c" />
+    <ClCompile Include="src\c\getHandleProperty\get_colors_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_constraints_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_datatips_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_box_property.c" />
@@ -256,7 +257,6 @@ lib /DEF:"$(ProjectDir)elementary_functions_f_Import.def" /SUBSYSTEM:WINDOWS /MA
     <ClCompile Include="src\c\getHandleProperty\get_color_mode_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_color_range_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_colored_property.c" />
-    <ClCompile Include="src\c\getHandleProperty\get_colors_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_cube_scaling_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_current_axes_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_current_entity_property.c" />
@@ -343,7 +343,6 @@ lib /DEF:"$(ProjectDir)elementary_functions_f_Import.def" /SUBSYSTEM:WINDOWS /MA
     <ClCompile Include="src\c\getHandleProperty\get_screen_position_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_scrollable_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_segs_color_property.c" />
-    <ClCompile Include="src\c\getHandleProperty\get_sizes_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_specular_color_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_sub_tics_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_surface_color_property.c" />
@@ -358,6 +357,7 @@ lib /DEF:"$(ProjectDir)elementary_functions_f_Import.def" /SUBSYSTEM:WINDOWS /MA
     <ClCompile Include="src\c\getHandleProperty\get_use_color_material_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_ambient_color_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_border_property.c" />
+    <ClCompile Include="src\c\getHandleProperty\set_colors_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_constraints_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_default_axes_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_diffuse_color_property.c" />
@@ -532,7 +532,6 @@ lib /DEF:"$(ProjectDir)elementary_functions_f_Import.def" /SUBSYSTEM:WINDOWS /MA
     <ClCompile Include="src\c\getHandleProperty\set_color_mode_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_color_range_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_colored_property.c" />
-    <ClCompile Include="src\c\getHandleProperty\set_colors_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_cube_scaling_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_current_axes_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_current_entity_property.c" />
@@ -594,7 +593,6 @@ lib /DEF:"$(ProjectDir)elementary_functions_f_Import.def" /SUBSYSTEM:WINDOWS /MA
     <ClCompile Include="src\c\getHandleProperty\set_rotation_style_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_screen_position_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_segs_color_property.c" />
-    <ClCompile Include="src\c\getHandleProperty\set_sizes_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_sub_tics_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_surface_color_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_surface_mode_property.c" />
@@ -756,4 +754,4 @@ lib /DEF:"$(ProjectDir)elementary_functions_f_Import.def" /SUBSYSTEM:WINDOWS /MA
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
index c6ba3c9..6ea2a2b 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup>
     <Filter Include="Source Files">
     <ClCompile Include="src\c\getHandleProperty\get_colored_property.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="src\c\getHandleProperty\get_colors_property.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="src\c\getHandleProperty\get_cube_scaling_property.c">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="src\c\getHandleProperty\get_segs_color_property.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="src\c\getHandleProperty\get_sizes_property.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="src\c\getHandleProperty\get_sub_tics_property.c">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="src\c\getHandleProperty\set_colored_property.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="src\c\getHandleProperty\set_colors_property.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="src\c\getHandleProperty\set_cube_scaling_property.c">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="src\c\getHandleProperty\set_segs_color_property.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="src\c\getHandleProperty\set_sizes_property.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="src\c\getHandleProperty\set_sub_tics_property.c">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="src\cpp\ContourOnMesh.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="src\c\getHandleProperty\get_colors_property.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="src\c\getHandleProperty\set_colors_property.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="includes\Axes.h">
       <Filter>Resource Files</Filter>
     </ResourceCompile>
   </ItemGroup>
-</Project>
+</Project>
\ No newline at end of file
index ba2fb11..8298f31 100644 (file)
@@ -18,8 +18,8 @@
     <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;,...)
+          p = scatter(x,y,&lt;s&gt;,&lt;c&gt;,&lt;"fill"&gt;,&lt;marker&gt;,&lt;marker_property,value&gt;)
+          p = scatter(&lt;axes_handle&gt;,...)
         </synopsis>
     </refsynopsisdiv>
     <refsection>
@@ -46,7 +46,7 @@
                 </listitem>
             </varlistentry>
             <varlistentry>
-                <term>s</term>
+                <term>&lt;s&gt;</term>
                 <listitem>
                     <para>
                         Specifying the sizes of the markers.
@@ -58,7 +58,7 @@
                 </listitem>
             </varlistentry>
             <varlistentry>
-                <term>c</term>
+                <term>&lt;c&gt;</term>
                 <listitem>
                     <para>
                         Specifying the colors of the markers.
                     </para>
                 </listitem>
             </varlistentry>
+            <varlistentry>
+                <term>&lt;p&gt;</term>
+                <listitem>
+                    <para>
+                        Returns a handle to the created polyline.
+                    </para>
+                </listitem>
+            </varlistentry>
         </variablelist>
     </refsection>
     <refsection>
@@ -435,37 +443,31 @@ t = linspace(0,1,200)
 x = t.*cos(10*%pi*t)
 y = t.*sin(10*%pi*t)
 // create 2D scatter plot
-scatter(x,y)
+p = scatter(x,y)
  ]]></programlisting>
         <scilab:image>
 t = linspace(0,25,200)
 x = t.*cos(t)
 y = t.*sin(t)
-scatter(x,y,t)
+p = scatter(x,y,t)
         </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(name2rgb("darkcyan")/255)
+p.thickness = 0.5
+p.mark_foreground = addcolor(name2rgb("darkblue")/255)
+p.mark_background = addcolor(name2rgb("darkcyan")/255)
  ]]></programlisting>
         <scilab:image>
 t = linspace(0,25,200)
 x = t.*cos(t)
 y = t.*sin(t)
-scatter(x,y,t)
-ce = gce()
-pl = ce.children
-pl.thickness = 0.5
-pl.mark_foreground = addcolor(name2rgb("darkblue")/255)
-pl.mark_background = addcolor(name2rgb("darkcyan")/255)
+p = scatter(x,y,t)
+p.thickness = 0.5
+p.mark_foreground = addcolor(name2rgb("darkblue")/255)
+p.mark_background = addcolor(name2rgb("darkcyan")/255)
         </scilab:image>
-    </refsection>
-    <refsection role="see also">
+      </refsection>
+      <refsection role="see also">
         <title>See Also</title>
         <simplelist type="inline">
             <member>
@@ -478,9 +480,6 @@ pl.mark_background = addcolor(name2rgb("darkcyan")/255)
                 <link linkend="gca">gca</link>
             </member>
             <member>
-                <link linkend="gce">gce</link>
-            </member>
-            <member>
                 <link linkend="gcf">gcf</link>
             </member>
             <member>
@@ -18,8 +18,8 @@
     <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;,...)
+          p = scatter3(x,y,z,&lt;s&gt;,&lt;c&gt;,&lt;"fill"&gt;,&lt;marker&gt;,&lt;marker_property,value&gt;)
+          p = scatter3(&lt;axes_handle&gt;,...)
         </synopsis>
     </refsynopsisdiv>
     <refsection>
@@ -56,7 +56,7 @@
                 </listitem>
             </varlistentry>
             <varlistentry>
-                <term>s</term>
+                <term>&lt;s&gt;</term>
                 <listitem>
                     <para>
                         Specifying the sizes of the markers.
@@ -68,7 +68,7 @@
                 </listitem>
             </varlistentry>
             <varlistentry>
-                <term>c</term>
+                <term>&lt;c&gt;</term>
                 <listitem>
                     <para>
                         Specifying the colors of the markers.
                     </para>
                 </listitem>
             </varlistentry>
+            <varlistentry>
+                <term>&lt;p&gt;</term>
+                <listitem>
+                    <para>
+                        Returns a handle to the created polyline.
+                    </para>
+                </listitem>
+            </varlistentry>
         </variablelist>
     </refsection>
     <refsection>
@@ -347,7 +355,7 @@ scatter3(x,y,z,s)
 set(gca(),"rotation_angles",[60,45])
         </scilab:image>
         <para>
-           Vary marker sie and color
+           Vary marker size and color
         </para>
         <programlisting role="example"><![CDATA[
 // x, y and z initialisation
@@ -492,15 +500,13 @@ x = t.*cos(t).*sin(t)
 y = t.*sin(t).*sin(t)
 z = t.*cos(t)
 s = linspace(50,1,length(t))
-scatter3(x,y,z,s)
+p = 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])
+p.mark_foreground = addcolor([0.5 0 0])
+p.mark_background = addcolor([0.5 0.5 0])
  ]]></programlisting>
         <scilab:image>
 t = 1:200
@@ -508,12 +514,11 @@ x = t.*cos(t).*sin(t)
 y = t.*sin(t).*sin(t)
 z = t.*cos(t)
 s = linspace(50,1,length(t))
-scatter3(x,y,z,s)
+p = 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])
+p.mark_foreground = addcolor([0.5 0 0])
+p.mark_background = addcolor([0.5 0.5 0])
         </scilab:image>
     </refsection>
     <refsection role="see also">
@@ -529,9 +534,6 @@ polyLine.mark_background = addcolor([0.5 0.5 0])
                 <link linkend="gca">gca</link>
             </member>
             <member>
-                <link linkend="gce">gce</link>
-            </member>
-            <member>
                 <link linkend="gcf">gcf</link>
             </member>
             <member>
index d0cf3f6..e5f225e 100644 (file)
@@ -76,7 +76,7 @@ rgb2name(rgb)
         <title>History</title>
         <revhistory>
             <revision>
-                <revnumber>6.0</revnumber>
+                <revnumber>5.6.0</revnumber>
                 <revremark>
                     Function <function>name2rgb</function> can now handle a single string and a matrix of strings.
                 </revremark>
index e7febb2..de0c310 100644 (file)
@@ -38,7 +38,7 @@ GRAPHICS_IMPEXP int sciSetLineWidth (int iObj, double linewidth) ;  /* SET */
 
 GRAPHICS_IMPEXP int sciSetLineStyle (int iObj, int linestyle) ; /* SET */
 
-GRAPHICS_IMPEXP int sciSetMarkSize (int iObj, int marksize); /* SET */
+GRAPHICS_IMPEXP int sciSetMarkSize (int iObj, int *markSizes, int numMarkSizes); /* SET */
 
 /* Text Functions */
 GRAPHICS_IMPEXP int sciSetText (int iObj, char ** text, int nbRow, int nbCol) ; /* SET */
index 5675218..37c2fec 100755 (executable)
@@ -55,6 +55,27 @@ function %h_p(h)
                 if length(bzs)>70 then bzs="matrix "+strcat(string(size(h.z_shift)),"x"),end
             end
 
+            if size(h.mark_size,"*") > 10 then
+                msz="matrix "+strcat(string(size(h.mark_size)),"x")
+            else
+                msz=sci2exp(h.mark_size,0)
+                if length(msz)>70 then msz="matrix "+strcat(string(size(h.mark_size)),"x"),end
+            end
+
+            if size(h.mark_foreground,"*") > 10 then
+                mfg="matrix "+strcat(string(size(h.mark_foreground)),"x")
+            else
+                mfg=sci2exp(h.mark_foreground,0)
+                if length(mfg)>70 then mfg="matrix "+strcat(string(size(h.mark_foreground)),"x"),end
+            end
+
+            if size(h.mark_background,"*") > 10 then
+                mbg="matrix "+strcat(string(size(h.mark_background)),"x")
+            else
+                mbg=sci2exp(h.mark_background,0)
+                if length(mbg)>70 then mbg="matrix "+strcat(string(size(h.mark_background)),"x"),end
+            end
+
             u=h.user_data;
             t=[t;
             "parent: "+h.parent.type
@@ -76,13 +97,12 @@ function %h_p(h)
             "interp_color_vector = "+sci2exp(h.interp_color_vector)
             "interp_color_mode = "+sci2exp(h.interp_color_mode)
             "colors = "+sci2exp(h.colors)
-            "sizes = "+sci2exp(h.sizes)
             "mark_mode = "+sci2exp(h.mark_mode)
             "mark_style = "+sci2exp(h.mark_style)
             "mark_size_unit = "+sci2exp(h.mark_size_unit)
-            "mark_size = "+string(h.mark_size)
-            "mark_foreground = "+string(h.mark_foreground)
-            "mark_background = "+string(h.mark_background)
+            "mark_size = "+msz
+            "mark_foreground = "+mfg
+            "mark_background = "+mbg
             "mark_offset = "+string(h.mark_offset)
             "mark_stride = "+string(h.mark_stride)
             "x_shift = "+bxs
index 8c0551b..a7911f3 100644 (file)
@@ -7,8 +7,9 @@
 // are also available at    
 // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 
-function scatter(varargin)
+function polyLine = scatter(varargin)
 
+    polyLine = 0;
     [lhs,rhs] = argn(0);
 
     if ~rhs
@@ -16,7 +17,7 @@ function scatter(varargin)
         t = linspace(0,25,200);
         x = t.*cos(t);
         y = t.*sin(t);
-        scatter(x,y,t,t,"fill","markerEdgeColor","darkblue")
+        polyLine = scatter(x,y,t,t,"fill","markerEdgeColor","darkblue")
         return;
     end
 
@@ -28,7 +29,6 @@ function scatter(varargin)
                 warning("Not enough input arguments.")
                 return;
             else
-                 disp("Graphic handle specified!")
                 axesHandle = varargin(1);
                 X = varargin(2);
                 Y = varargin(3);
index 0ee1633..dd8d3f0 100644 (file)
@@ -7,8 +7,9 @@
 // are also available at    
 // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 
-function scatter3(varargin)
+function polyLine = scatter3(varargin)
 
+    polyLine = 0;
     [lhs,rhs] = argn(0);
 
     if ~rhs
@@ -16,7 +17,7 @@ function scatter3(varargin)
         z = linspace(0,25,200);
         x = z.*cos(z);
         y = z.*sin(z);
-        scatter3(x,y,z,z,z,"fill","markerEdgeColor","darkblue");
+        polyLine = scatter3(x,y,z,z,z,"fill","markerEdgeColor","darkblue");
         set(gca(),"rotation_angles",[60,45])
         return;
     end
@@ -29,7 +30,6 @@ function scatter3(varargin)
                 warning("Not enough input arguments.")
                 return;
             else
-                 disp("Graphic handle specified!")
                 axesHandle = varargin(1);
                 X = varargin(2);
                 Y = varargin(3);
index d8853bb..a7bb906 100644 (file)
@@ -12,18 +12,14 @@ function [S,C,thickness,markStyle,markFg,markBg,fill,scanFailed] = scatterScanVa
     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.';
@@ -39,22 +35,17 @@ function [S,C,thickness,markStyle,markFg,markBg,fill,scanFailed] = scatterScanVa
     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
@@ -70,7 +61,6 @@ function [S,C,thickness,markStyle,markFg,markBg,fill,scanFailed] = scatterScanVa
                     // 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        
@@ -81,7 +71,6 @@ function [S,C,thickness,markStyle,markFg,markBg,fill,scanFailed] = scatterScanVa
                         scanFailed = %T;
                         return;
                     else
-                         // disp("Color vector of strings specified!");
                          nextArgin = nextArgin + 1;
                     end
                 end
@@ -90,13 +79,10 @@ function [S,C,thickness,markStyle,markFg,markBg,fill,scanFailed] = scatterScanVa
     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
@@ -109,7 +95,6 @@ function [S,C,thickness,markStyle,markFg,markBg,fill,scanFailed] = scatterScanVa
         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
@@ -117,8 +102,6 @@ function [S,C,thickness,markStyle,markFg,markBg,fill,scanFailed] = scatterScanVa
     end
 
     // check for property-value pairs
-    // disp("check for property-value pairs");
-    // disp(["nextArgin = " string(nextArgin)]);
     markFg = -1;
     markBg = -1;
     thickness = 1.0; // default
@@ -128,10 +111,8 @@ function [S,C,thickness,markStyle,markFg,markBg,fill,scanFailed] = scatterScanVa
             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."]));
@@ -139,7 +120,6 @@ function [S,C,thickness,markStyle,markFg,markBg,fill,scanFailed] = scatterScanVa
                     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."]));
@@ -147,7 +127,6 @@ function [S,C,thickness,markStyle,markFg,markBg,fill,scanFailed] = scatterScanVa
                     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."]));
@@ -155,7 +134,6 @@ function [S,C,thickness,markStyle,markFg,markBg,fill,scanFailed] = scatterScanVa
                     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."]));
@@ -163,7 +141,6 @@ function [S,C,thickness,markStyle,markFg,markBg,fill,scanFailed] = scatterScanVa
                     return;
                 end;
             case "markerFaceColor"
-                // disp("Property markerFaceColor");
                 fill = %T;
                 markBg = colorIndex(argins(nextArgin+1));
                 if markBg == -1 then
@@ -172,7 +149,6 @@ function [S,C,thickness,markStyle,markFg,markBg,fill,scanFailed] = scatterScanVa
                     return;
                 end;
             case "markerBackground"
-                // disp("Property markerBackground");
                 fill = %T;
                 markBg = colorIndex(argins(nextArgin+1));
                 if markBg == -1 then
@@ -182,7 +158,6 @@ function [S,C,thickness,markStyle,markFg,markBg,fill,scanFailed] = scatterScanVa
                 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."]));
@@ -191,7 +166,6 @@ function [S,C,thickness,markStyle,markFg,markBg,fill,scanFailed] = scatterScanVa
                 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."]));
@@ -199,7 +173,7 @@ function [S,C,thickness,markStyle,markFg,markBg,fill,scanFailed] = scatterScanVa
                     return;
                 end
             else
-                warning(strcat(["There is no " argin(nextArgin) " property on the Scatter class."]));
+                warning(strcat(["There is no " argins(nextArgin) " property on the Scatter class."]));
                 scanFailed = %T;
                 return;
             end
@@ -214,12 +188,10 @@ function colorInd = colorIndex(colorSpec)
     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
index f9463be..75bb371 100644 (file)
@@ -24,38 +24,29 @@ function scatterSetPolyline(polyLine,S,C,thickness,markStyle,markFg,markBg,fill)
     if isempty(S) then
         polyLine.mark_size = 7;
     else
-        if size(S) == [1 1] then
+        if size(S) == [1 1] | size(S) == [1 n]
             polyLine.mark_size = ceil(sqrt(4*S/%pi));
-        elseif size(S) == [1 n]
-            polyLine.mark_size = -3;
-            polyLine.sizes = ceil(sqrt(4*S/%pi));
         else
             warning("S must be a scalar or a vector of the same length as X.");
             return;
         end
     end
 
-   // set mark foreground and background color
+    // set mark foreground and background color
     if isempty(C) then
         if markFg == -1 then
-            polyLine.mark_foreground = addcolor(name2rgb("blue")/255); // default
-        else
-            polyLine.mark_foreground = markFg;
+            markFg = addcolor(name2rgb("blue")/255); // default
         end
+        polyLine.mark_foreground = markFg;
         if markBg == -1 then
-            if fill == %T then
-                polyLine.mark_background = polyLine.mark_foreground;
-            else
-                polyLine.mark_background = 0; // transparent
-            end
+            markBg = markFg;
+        end
+        if fill == %T then
+            polyLine.mark_background = markBg;
         else
-            if fill == %T then
-                polyLine.mark_background = markBg;
-            else
-                polyLine.mark_background = 0; // transparent
-            end
+            polyLine.mark_background = 0; // transparent
         end
-    else
+     else
         if size(C) == [1 1] then
             polyLine.mark_foreground = C; 
             if fill == %T then
@@ -68,16 +59,15 @@ function scatterSetPolyline(polyLine,S,C,thickness,markStyle,markFg,markBg,fill)
                 end
             end
         else
-            polyLine.colors = C;
             if fill == %T then
                 if markFg == -1 then
-                    polyLine.mark_foreground = -3;
+                    polyLine.mark_foreground = C; // transparent
                 else
                     polyLine.mark_foreground = markFg;
                 end
-                polyLine.mark_background = -3;
+                polyLine.mark_background = C;
             else
-                polyLine.mark_foreground = -3;
+                polyLine.mark_foreground = C;
                 if markBg == -1 then
                     polyLine.mark_background = 0; // transparent
                 else
index c890cf3..d1bfcd9 100644 (file)
@@ -114,21 +114,39 @@ int sciSetLineStyle(int iObjUID, int linestyle)
     return -1;
 }
 
-int sciSetMarkSize(int iObjUID, int marksize)
+int sciSetMarkSize(int iObjUID, int *markSizes, int numMarkSizes)
 {
-    if (marksize < 0 && marksize != -3)
-    {
-        Scierror(999, _("Wrong value for '%s' property: Must be greater or equal to %d.\n"), "mark_size", 0);
-        return -1;
-    }
-    else
-    {
-        BOOL status = setGraphicObjectProperty(iObjUID, __GO_MARK_SIZE__, &marksize, jni_int, 1);
+       BOOL status;
+       int k;
+
+       if ( markSizes == NULL || numMarkSizes < 1 )
+       {
+               Scierror(999, _("Wrong value for '%s' property: Number of mark sizes %d.\n"), "mark_size", numMarkSizes);
+               return -1;
+       }
+
+       // check values >= 0
+       for ( k = 0; k < numMarkSizes; ++k )
+       {
+           if ( markSizes[k] < 0 )
+               {
+                       Scierror(999, _("Wrong value for '%s' property: Must be greater or equal to %d.\n"), "mark_size", 0);
+                       return -1;
+               }
+       }
+
+       if ( numMarkSizes == 1 )
+       {
+               status = setGraphicObjectProperty(iObjUID, __GO_MARK_SIZE__, &markSizes[0], jni_int, numMarkSizes);             
+       }
+       else
+       {
+               status = setGraphicObjectProperty(iObjUID, __GO_MARK_SIZES__, markSizes, jni_int_vector, numMarkSizes);         
+       }
 
-        if (status == TRUE)
-        {
-            return 0;
-        }
+    if (status == TRUE)
+    {
+               return 0;
     }
 
     printSetGetErrorMessage("mark_size");
index b3810c8..9d40fed 100755 (executable)
@@ -253,8 +253,7 @@ static getHashTableCouple propertyGetTable[] =
     {"marks_count", get_marks_count_property},
     {"ticks_format", get_ticks_format_property},
     {"ticks_st", get_ticks_st_property},
-    {"colors", get_colors_property},
-    {"sizes", get_sizes_property}
+    {"colors", get_colors_property}
 };
 
 /*--------------------------------------------------------------------------*/
index c4ee1a4..c95fc91 100755 (executable)
@@ -255,8 +255,7 @@ static setHashTableCouple propertySetTable[] =
     {"marks_count", set_marks_count_property},
     {"ticks_format", set_ticks_format_property},
     {"ticks_st", set_ticks_st_property},
-    {"colors", set_colors_property},
-    {"sizes", set_sizes_property}
+    {"colors", set_colors_property}
 };
 
 /*--------------------------------------------------------------------------*/
index 6d93060..411bde6 100755 (executable)
@@ -200,6 +200,5 @@ int get_auto_margins_property(void* _pvCtx, int iObjUID);
 int get_ticks_format_property(void* _pvCtx, int iObjUID);
 int get_ticks_st_property(void* _pvCtx, int iObjUID);
 int get_colors_property(void* _pvCtx, int iObjUID);
-int get_sizes_property(void* _pvCtx, int iObjUID);
 
 #endif /* _GET_HANDLE_PROPERTY_H_ */
index 94873ce..f87238c 100644 (file)
@@ -35,14 +35,21 @@ int get_mark_background_property(void* _pvCtx, int iObjUID)
     int iMarkBackground = 0;
     int* piMarkBackground = &iMarkBackground;
 
-    getGraphicObjectProperty(iObjUID, __GO_MARK_BACKGROUND__, jni_int, (void**)&piMarkBackground);
+       int * markBackgrounds = NULL;
+    int numMarkBackgrounds = 0;
+    int * piNumMarkBackgrounds = &numMarkBackgrounds;
 
-    if (piMarkBackground == NULL)
-    {
-        Scierror(999, _("'%s' property does not exist for this handle.\n"), "mark_background");
-        return -1;
-    }
+       getGraphicObjectProperty(iObjUID, __GO_NUM_MARK_BACKGROUNDS__, jni_int, (void**)&piNumMarkBackgrounds);
 
-    return sciReturnDouble(_pvCtx, iMarkBackground);
+       if (numMarkBackgrounds == 0)
+       {
+               getGraphicObjectProperty(iObjUID, __GO_MARK_BACKGROUND__, jni_int, &piMarkBackground);
+               return sciReturnDouble(_pvCtx, iMarkBackground);
+       }
+       else
+       {
+               getGraphicObjectProperty(iObjUID, __GO_MARK_BACKGROUNDS__, jni_int_vector, &markBackgrounds);
+               return sciReturnRowVectorFromInt(_pvCtx, markBackgrounds, numMarkBackgrounds);
+       }
 }
 /*------------------------------------------------------------------------*/
index 5a95aba..99c436b 100644 (file)
@@ -37,14 +37,21 @@ int get_mark_foreground_property(void* _pvCtx, int iObjUID)
     int iMarkForeground = 0;
     int* piMarkForeground = &iMarkForeground;
 
-    getGraphicObjectProperty(iObjUID, __GO_MARK_FOREGROUND__, jni_int, (void**)&piMarkForeground);
-
-    if (piMarkForeground == NULL)
-    {
-        Scierror(999, _("'%s' property does not exist for this handle.\n"), "mark_foreground");
-        return -1;
-    }
-
-    return sciReturnDouble(_pvCtx, iMarkForeground);
+    int * markForegrounds = NULL;
+    int numMarkForegrounds = 0;
+    int * piNumMarkForegrounds = &numMarkForegrounds;
+
+       getGraphicObjectProperty(iObjUID, __GO_NUM_MARK_FOREGROUNDS__, jni_int, (void**)&piNumMarkForegrounds);
+
+       if (numMarkForegrounds == 0)
+       {
+               getGraphicObjectProperty(iObjUID, __GO_MARK_FOREGROUND__, jni_int, &piMarkForeground);
+               return sciReturnDouble(_pvCtx, iMarkForeground);
+       }
+       else
+       {
+               getGraphicObjectProperty(iObjUID, __GO_MARK_FOREGROUNDS__, jni_int_vector, &markForegrounds);
+               return sciReturnRowVectorFromInt(_pvCtx, markForegrounds, numMarkForegrounds);
+       }
 }
 /*------------------------------------------------------------------------*/
index 9e861fb..7b721cc 100644 (file)
@@ -35,14 +35,21 @@ int get_mark_size_property(void* _pvCtx, int iObjUID)
     int iMarkSize = 0;
     int* piMarkSize = &iMarkSize;
 
-    getGraphicObjectProperty(iObjUID, __GO_MARK_SIZE__, jni_int, (void**)&piMarkSize);
+    int * markSizes = NULL;
+    int numMarkSizes = 0;
+    int * piNumMarkSizes = &numMarkSizes;
 
-    if (piMarkSize == NULL)
-    {
-        Scierror(999, _("'%s' property does not exist for this handle.\n"), "mark_size");
-        return -1;
-    }
+       getGraphicObjectProperty(iObjUID, __GO_NUM_MARK_SIZES__, jni_int, &piNumMarkSizes);
 
-    return sciReturnDouble(_pvCtx, iMarkSize);
+       if (numMarkSizes == 0)
+       {
+               getGraphicObjectProperty(iObjUID, __GO_MARK_SIZE__, jni_int, &piMarkSize);
+               return sciReturnDouble(_pvCtx, iMarkSize);
+       }
+       else
+       {
+               getGraphicObjectProperty(iObjUID, __GO_MARK_SIZES__, jni_int_vector, &markSizes);
+               return sciReturnRowVectorFromInt(_pvCtx, markSizes, numMarkSizes);
+       }
 }
 /*------------------------------------------------------------------------*/
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/get_sizes_property.c b/scilab/modules/graphics/src/c/getHandleProperty/get_sizes_property.c
deleted file mode 100644 (file)
index 855c27c..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - 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-en.txt
- *
- */
-
-/*------------------------------------------------------------------------*/
-/* file: get_sizes_property.c                                             */
-/* desc : function to get in Scilab the polyline sizes                    */
-/*------------------------------------------------------------------------*/
-
-#include "MALLOC.h"
-#include "SetPropertyStatus.h"
-#include "getHandleProperty.h"
-#include "GetProperty.h"
-#include "returnProperty.h"
-#include "HandleManagement.h"
-#include "Scierror.h"
-#include "localization.h"
-
-#include "getGraphicObjectProperty.h"
-#include "graphicObjectProperties.h"
-
-/*------------------------------------------------------------------------*/
-int get_sizes_property(void* _pvCtx, int iObjUID)
-{
-    int * sizes = NULL;
-    int numSizes = 0;
-    int * piNumSizes = &numSizes;
-
-    getGraphicObjectProperty(iObjUID, __GO_SIZES__, jni_int_vector, (void **)&sizes);
-    getGraphicObjectProperty(iObjUID, __GO_NUM_SIZES__, jni_int, &piNumSizes);
-
-    if (sizes == NULL || numSizes == 0)
-    {
-        sciReturnEmptyMatrix(_pvCtx);
-        return SET_PROPERTY_SUCCEED;
-    }
-
-    return sciReturnRowVectorFromInt(_pvCtx, sizes, numSizes);
-}
-/*------------------------------------------------------------------------*/
index 710ec27..8831a2b 100755 (executable)
@@ -203,6 +203,5 @@ int set_auto_margins_property(void* _pvCtx, int iObj, void* _pvData, int valueTy
 int set_ticks_format_property(void* _pvCtx, int iObj, void* _pvData, int valueType, int nbRow, int nbCol);
 int set_ticks_st_property(void* _pvCtx, int iObj, void* _pvData, int valueType, int nbRow, int nbCol);
 int set_colors_property(void* _pvCtx, int iObj, void* _pvData, int valueType, int nbRow, int nbCol);
-int set_sizes_property(void* _pvCtx, int iObj, void* _pvData, int valueType, int nbRow, int nbCol);
 
 #endif /* _SET_HANDLE_PROPERTY_H_ */
index ae921d9..619aa55 100644 (file)
 #include "setGraphicObjectProperty.h"
 #include "graphicObjectProperties.h"
 
+#include "MALLOC.h"
+
 /*------------------------------------------------------------------------*/
 int set_mark_background_property(void* _pvCtx, int iObjUID, void* _pvData, int valueType, int nbRow, int nbCol)
 {
     BOOL status = FALSE;
     int markBackground = 0;
+       int *tmp = NULL;
+    int colorSet = 0;
 
-    if (valueType != sci_matrix)
+    if ( valueType != sci_matrix )
     {
         Scierror(999, _("Wrong type for '%s' property: Integer expected.\n"), "mark_background");
         return SET_PROPERTY_ERROR;
     }
 
-    markBackground = (int)((double*)_pvData)[0];
+    if ( nbRow != 1 || nbCol <= 0 )
+    {
+        Scierror(999, _("Wrong size for '%s' property: Row vector expected.\n"), "mark_background");
+        return SET_PROPERTY_ERROR;
+    }
 
-    status = setGraphicObjectProperty(iObjUID, __GO_MARK_BACKGROUND__, &markBackground, jni_int, 1);
+       if ( nbCol == 1 )
+       {
+               markBackground = (int)((double*)_pvData)[0];
+               status = setGraphicObjectProperty(iObjUID, __GO_MARK_BACKGROUND__, &markBackground, jni_int, 1);
+       }
+       else
+       {
+               tmp = MALLOC(nbCol * sizeof(int));
+               copyDoubleVectorToIntFromStack(_pvData, tmp, nbCol);
+               status = setGraphicObjectProperty(iObjUID, __GO_MARK_BACKGROUNDS__, tmp, jni_int_vector, nbCol);
+               FREE(tmp);
+        colorSet = 1;
+        setGraphicObjectProperty(iObjUID, __GO_COLOR_SET__, &colorSet, jni_bool, 1);
+       }
 
     if (status == TRUE)
     {
index 974fbc1..d375ab1 100644 (file)
 #include "setGraphicObjectProperty.h"
 #include "graphicObjectProperties.h"
 
+#include "MALLOC.h"
+
 /*------------------------------------------------------------------------*/
 int set_mark_foreground_property(void* _pvCtx, int iObjUID, void* _pvData, int valueType, int nbRow, int nbCol)
 {
     BOOL status = FALSE;
     int markForeground = 0;
+       int *tmp = NULL;
+    int colorSet = 0;
 
-    if (valueType != sci_matrix)
+    if ( valueType != sci_matrix )
     {
         Scierror(999, _("Wrong type for '%s' property: Integer expected.\n"), "mark_foreground");
         return SET_PROPERTY_ERROR;
     }
 
-    markForeground = (int)((double*)_pvData)[0];
+    if ( nbRow != 1 || nbCol <= 0 )
+    {
+        Scierror(999, _("Wrong size for '%s' property: Row vector expected.\n"), "mark_foreground");
+        return SET_PROPERTY_ERROR;
+    }
 
-    status = setGraphicObjectProperty(iObjUID, __GO_MARK_FOREGROUND__, &markForeground, jni_int, 1);
+       if ( nbCol == 1 )
+       {
+               markForeground = (int)((double*)_pvData)[0];
+               status = setGraphicObjectProperty(iObjUID, __GO_MARK_FOREGROUND__, &markForeground, jni_int, 1);
+       }
+       else
+       {
+               tmp = MALLOC(nbCol * sizeof(int));
+               copyDoubleVectorToIntFromStack(_pvData, tmp, nbCol);
+               status = setGraphicObjectProperty(iObjUID, __GO_MARK_FOREGROUNDS__, tmp, jni_int_vector, nbCol);
+               FREE(tmp);
+        colorSet = 1;
+        setGraphicObjectProperty(iObjUID, __GO_COLOR_SET__, &colorSet, jni_bool, 1);
+       }
 
     if (status == TRUE)
     {
index 0c07f84..7bdde46 100644 (file)
@@ -18,6 +18,7 @@
 /*        a handle                                                        */
 /*------------------------------------------------------------------------*/
 
+#include "MALLOC.h"
 #include "setHandleProperty.h"
 #include "SetProperty.h"
 #include "getPropertyAssignedValue.h"
 /*------------------------------------------------------------------------*/
 int set_mark_size_property(void* _pvCtx, int iObjUID, void* _pvData, int valueType, int nbRow, int nbCol)
 {
-    if (valueType != sci_matrix)
+       int status = -1;
+    int *tmp = NULL;
+
+    if ( valueType != sci_matrix )
+    {
+        Scierror(999, _("Wrong type for '%s' property: Matrix expected.\n"), "mark_size");
+        return SET_PROPERTY_ERROR;
+    }
+
+    if ( nbRow != 1 || nbCol <= 0 )
     {
-        Scierror(999, _("Wrong type for '%s' property: Real expected.\n"), "mark_size");
+        Scierror(999, _("Wrong size for '%s' property: Row vector expected.\n"), "mark_size");
         return SET_PROPERTY_ERROR;
     }
 
-    return sciSetMarkSize(iObjUID, (int) ((double*)_pvData)[0]);
+       tmp = MALLOC(nbCol * sizeof(int));
+    copyDoubleVectorToIntFromStack(_pvData, tmp, nbCol);
+       status = sciSetMarkSize(iObjUID, tmp, nbCol);
+       FREE(tmp);
+
+    return status;
 }
 /*------------------------------------------------------------------------*/
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_sizes_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_sizes_property.c
deleted file mode 100644 (file)
index e5d46e6..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - 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-en.txt
- *
- */
-
-/*------------------------------------------------------------------------*/
-/* file: set_sizes_property.c                                             */
-/* desc : function to modify in Scilab the polylines sizes                 */
-/*------------------------------------------------------------------------*/
-
-#include "MALLOC.h"
-#include "setHandleProperty.h"
-#include "SetProperty.h"
-#include "getPropertyAssignedValue.h"
-#include "Scierror.h"
-#include "localization.h"
-#include "GetProperty.h"
-#include "SetPropertyStatus.h"
-
-#include "getGraphicObjectProperty.h"
-#include "setGraphicObjectProperty.h"
-#include "graphicObjectProperties.h"
-
-/*------------------------------------------------------------------------*/
-int set_sizes_property(void* _pvCtx, int iObjUID, void* _pvData, int valueType, int nbRow, int nbCol )
-{
-    BOOL status = FALSE;
-    int iNumElements = 0;
-    int* piNumElements = &iNumElements;
-
-    if (valueType != sci_matrix)
-    {
-        Scierror(999, _("Wrong type for '%s' property: Real matrix expected.\n"), "sizes");
-        return SET_PROPERTY_ERROR;
-    }
-
-    getGraphicObjectProperty(iObjUID, __GO_DATA_MODEL_NUM_ELEMENTS__, jni_int, (void **) &piNumElements);
-    if (piNumElements == NULL)
-    {
-        Scierror(999, _("'%s' property does not exist for this handle.\n"), "sizes");
-        return SET_PROPERTY_ERROR;
-    }
-
-    if (nbCol == 0)
-    {
-        int numSizes = 0;
-        status = setGraphicObjectProperty(iObjUID, __GO_NUM_SIZES__, &numSizes, jni_int, 1);
-        if (status == FALSE)
-        {
-            Scierror(999, _("'%s' property does not exist for this handle.\n"), "sizes");
-            return SET_PROPERTY_ERROR;
-        }
-        setGraphicObjectProperty(iObjUID, __GO_SIZES__, NULL, jni_int_vector, 0);
-
-        return SET_PROPERTY_SUCCEED;
-    }
-
-    if (nbCol == iNumElements)
-    {
-        int * tmp = MALLOC(nbCol * sizeof(int));
-        copyDoubleVectorToIntFromStack(_pvData, tmp, nbCol);
-
-        status = setGraphicObjectProperty(iObjUID, __GO_SIZES__, tmp, jni_int_vector, nbCol);
-        if (status == TRUE)
-        {
-            int numSizes = nbCol;
-            setGraphicObjectProperty(iObjUID, __GO_NUM_SIZES__, &numSizes, jni_int, 1);
-            FREE(tmp);
-            return SET_PROPERTY_SUCCEED;
-        }
-        else
-        {
-            FREE(tmp);
-            Scierror(999, _("'%s' property does not exist for this handle.\n"), "sizes");
-            return SET_PROPERTY_ERROR;
-        }
-    }
-    else
-    {
-        Scierror(999, _("The number of column of the size vector must match the number of points defining the line.\n"));
-        return SET_PROPERTY_ERROR;
-    }
-}
-/*------------------------------------------------------------------------*/
diff --git a/scilab/modules/graphics/tests/unit_tests/scatter.dia.ref b/scilab/modules/graphics/tests/unit_tests/scatter.dia.ref
new file mode 100644 (file)
index 0000000..ad07c80
--- /dev/null
@@ -0,0 +1,222 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Scilab Enterprises - 2015-2010 - Juergen Koch <juergen.koch@hs-esslingen.de>
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- TEST WITH GRAPHIC -->
+//
+// test data
+rand("seed",0);
+x = linspace(0,2,200);
+y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x));
+s = linspace(1,30,length(x));
+//
+// Test #1 Create 2D scatter plot 
+h = scf();
+p = scatter(x,y);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,7);
+assert_checkequal(p.mark_foreground,2);
+assert_checkequal(p.mark_background,0);
+close(h);
+//
+// Test #2 Vary marker size
+h = scf();
+p = scatter(x,y,s);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,ceil(sqrt(4*s/%pi)));
+assert_checkequal(p.mark_foreground,2);
+assert_checkequal(p.mark_background,0);
+close(h);
+//
+// Test #3 Vary marker size and color
+h = scf();
+set(gcf(),"color_map",coolcolormap(64))
+p = scatter(x,y,s,x);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,ceil(sqrt(4*s/%pi)));
+assert_checkequal(p.mark_foreground,floor((64-1)*(x-min(x))/(max(x)-min(x))+1));
+assert_checkequal(p.mark_background,0);
+close(h);
+//
+// Test #4 Fill the markers
+h = scf();
+p = scatter(x,y,s,y,"fill");
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,ceil(sqrt(4*s/%pi)));
+assert_checkequal(p.mark_foreground,floor((32-1)*(y-min(y))/(max(y)-min(y))+1));
+assert_checkequal(p.mark_background,floor((32-1)*(y-min(y))/(max(y)-min(y))+1));
+close(h);
+//
+// Test #5 Specify subplot for scatter plot
+h = scf();
+subplot(2,1,1);
+p1 = scatter(gca(),x,y);
+assert_checkequal(p1.line_mode,"off");
+assert_checkequal(p1.fill_mode,"off");
+assert_checkequal(p1.thickness,1);
+assert_checkequal(p1.mark_mode,"on");
+assert_checkequal(p1.mark_style,9);
+assert_checkequal(p1.mark_size_unit,"point");
+assert_checkequal(p1.mark_size,7);
+assert_checkequal(p1.mark_foreground,2);
+assert_checkequal(p1.mark_background,0);
+subplot(2,1,2);
+p2 = scatter(gca(),x,y,"fill","s");
+assert_checkequal(p2.line_mode,"off");
+assert_checkequal(p2.fill_mode,"off");
+assert_checkequal(p2.thickness,1);
+assert_checkequal(p2.mark_mode,"on");
+assert_checkequal(p2.mark_style,11);
+assert_checkequal(p2.mark_size_unit,"point");
+assert_checkequal(p2.mark_size,7);
+assert_checkequal(p2.mark_foreground,2);
+assert_checkequal(p2.mark_background,2);
+close(h);
+//
+// test data
+rand("seed",0);
+x = rand(1,200);
+y = rand(1,200);
+//
+// Test #6 Specify marker symbol
+h = scf();
+p = scatter(x,y,"d");
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,5);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,7);
+assert_checkequal(p.mark_foreground,2);
+assert_checkequal(p.mark_background,0);
+close(h);
+//
+// Test #7 Change marker color and line width
+h = scf();
+p = scatter(x,y,"markerEdgeColor",[0 .4 .4],...
+                "markerFaceColor",[0 .8 .8],...
+                "linewidth",1.5);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1.5);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,7);
+assert_checkequal(p.mark_foreground,color(0,.4*255,.4*255));
+assert_checkequal(p.mark_background,color(0,.8*255,.8*255));
+close(h);
+//
+// Test data
+t = linspace(0,25,200);
+x = t.*cos(t);
+y = t.*sin(t);
+//
+// Test #8 Modify scatter plot after creation
+h = scf();
+p = scatter(x,y,t);
+p.thickness = 0.5;
+p.mark_foreground = color("darkblue");
+p.mark_background = color("darkcyan");
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,0.5);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,ceil(sqrt(4*t/%pi)));
+assert_checkequal(p.mark_foreground,color("darkblue"));
+assert_checkequal(p.mark_background,color("darkcyan"));
+close(h);
+//
+// Test #9 Testing graphics handle
+h = scf();
+p = scatter(gca(),x,y,t);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,ceil(sqrt(4*t/%pi)));
+assert_checkequal(p.mark_foreground,2);
+assert_checkequal(p.mark_background,0);
+close(h);
+//
+// Test data
+x = 0.1:0.2:0.9;
+//
+// Test #10 Testing single color string specification
+h = scf();
+p = scatter(x,x,[],"red");
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,7);
+assert_checkequal(p.mark_foreground,color("red"));
+assert_checkequal(p.mark_background,0);
+close(h);
+//
+// Test #11 Testing color vector of strings specification
+h = scf();
+p = scatter(x,x,[],["red" "green" "blue" "grey" "black"]);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,7);
+assert_checkequal(p.mark_foreground,[color("red") color("green") color("blue") color("grey") color("black")]);
+assert_checkequal(p.mark_background,0);
+close(h);
+//
+// Test #12 Testing color RGB matrix specification
+h = scf();
+RGB = [255   0   0
+         0 255   0
+         0   0 255
+       128 128 128
+         0   0   0];
+p = scatter(x,x,[],RGB/255);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,7);
+assert_checkequal(p.mark_foreground,...
+[color(RGB(1,1),RGB(1,2),RGB(1,3))...
+ color(RGB(2,1),RGB(2,2),RGB(2,3))...
+ color(RGB(3,1),RGB(3,2),RGB(3,3))...
+ color(RGB(4,1),RGB(4,2),RGB(4,3))...
+ color(RGB(5,1),RGB(5,2),RGB(5,3))]);
+assert_checkequal(p.mark_background,0);
+close(h);
diff --git a/scilab/modules/graphics/tests/unit_tests/scatter.tst b/scilab/modules/graphics/tests/unit_tests/scatter.tst
new file mode 100644 (file)
index 0000000..e6565dd
--- /dev/null
@@ -0,0 +1,231 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Scilab Enterprises - 2015-2010 - Juergen Koch <juergen.koch@hs-esslingen.de>
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- TEST WITH GRAPHIC -->
+
+//
+// test data
+rand("seed",0);
+x = linspace(0,2,200);
+y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x));
+s = linspace(1,30,length(x));
+
+//
+// Test #1 Create 2D scatter plot 
+h = scf();
+p = scatter(x,y);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,7);
+assert_checkequal(p.mark_foreground,2);
+assert_checkequal(p.mark_background,0);
+close(h);
+//
+// Test #2 Vary marker size
+h = scf();
+p = scatter(x,y,s);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,ceil(sqrt(4*s/%pi)));
+assert_checkequal(p.mark_foreground,2);
+assert_checkequal(p.mark_background,0);
+close(h);
+//
+// Test #3 Vary marker size and color
+h = scf();
+set(gcf(),"color_map",coolcolormap(64))
+p = scatter(x,y,s,x);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,ceil(sqrt(4*s/%pi)));
+assert_checkequal(p.mark_foreground,floor((64-1)*(x-min(x))/(max(x)-min(x))+1));
+assert_checkequal(p.mark_background,0);
+close(h);
+//
+// Test #4 Fill the markers
+h = scf();
+p = scatter(x,y,s,y,"fill");
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,ceil(sqrt(4*s/%pi)));
+assert_checkequal(p.mark_foreground,floor((32-1)*(y-min(y))/(max(y)-min(y))+1));
+assert_checkequal(p.mark_background,floor((32-1)*(y-min(y))/(max(y)-min(y))+1));
+close(h);
+//
+// Test #5 Specify subplot for scatter plot
+h = scf();
+subplot(2,1,1);
+p1 = scatter(gca(),x,y);
+assert_checkequal(p1.line_mode,"off");
+assert_checkequal(p1.fill_mode,"off");
+assert_checkequal(p1.thickness,1);
+assert_checkequal(p1.mark_mode,"on");
+assert_checkequal(p1.mark_style,9);
+assert_checkequal(p1.mark_size_unit,"point");
+assert_checkequal(p1.mark_size,7);
+assert_checkequal(p1.mark_foreground,2);
+assert_checkequal(p1.mark_background,0);
+subplot(2,1,2);
+p2 = scatter(gca(),x,y,"fill","s");
+assert_checkequal(p2.line_mode,"off");
+assert_checkequal(p2.fill_mode,"off");
+assert_checkequal(p2.thickness,1);
+assert_checkequal(p2.mark_mode,"on");
+assert_checkequal(p2.mark_style,11);
+assert_checkequal(p2.mark_size_unit,"point");
+assert_checkequal(p2.mark_size,7);
+assert_checkequal(p2.mark_foreground,2);
+assert_checkequal(p2.mark_background,2);
+close(h);
+
+//
+// test data
+rand("seed",0);
+x = rand(1,200);
+y = rand(1,200);
+
+//
+// Test #6 Specify marker symbol
+h = scf();
+p = scatter(x,y,"d");
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,5);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,7);
+assert_checkequal(p.mark_foreground,2);
+assert_checkequal(p.mark_background,0);
+close(h);
+//
+// Test #7 Change marker color and line width
+h = scf();
+p = scatter(x,y,"markerEdgeColor",[0 .4 .4],...
+                "markerFaceColor",[0 .8 .8],...
+                "linewidth",1.5);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1.5);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,7);
+assert_checkequal(p.mark_foreground,color(0,.4*255,.4*255));
+assert_checkequal(p.mark_background,color(0,.8*255,.8*255));
+close(h);
+
+//
+// Test data
+t = linspace(0,25,200);
+x = t.*cos(t);
+y = t.*sin(t);
+
+//
+// Test #8 Modify scatter plot after creation
+h = scf();
+p = scatter(x,y,t);
+p.thickness = 0.5;
+p.mark_foreground = color("darkblue");
+p.mark_background = color("darkcyan");
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,0.5);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,ceil(sqrt(4*t/%pi)));
+assert_checkequal(p.mark_foreground,color("darkblue"));
+assert_checkequal(p.mark_background,color("darkcyan"));
+close(h);
+//
+// Test #9 Testing graphics handle
+h = scf();
+p = scatter(gca(),x,y,t);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,ceil(sqrt(4*t/%pi)));
+assert_checkequal(p.mark_foreground,2);
+assert_checkequal(p.mark_background,0);
+close(h);
+
+//
+// Test data
+x = 0.1:0.2:0.9;
+
+//
+// Test #10 Testing single color string specification
+h = scf();
+p = scatter(x,x,[],"red");
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,7);
+assert_checkequal(p.mark_foreground,color("red"));
+assert_checkequal(p.mark_background,0);
+close(h);
+//
+// Test #11 Testing color vector of strings specification
+h = scf();
+p = scatter(x,x,[],["red" "green" "blue" "grey" "black"]);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,7);
+assert_checkequal(p.mark_foreground,[color("red") color("green") color("blue") color("grey") color("black")]);
+assert_checkequal(p.mark_background,0);
+close(h);
+//
+// Test #12 Testing color RGB matrix specification
+h = scf();
+RGB = [255   0   0
+         0 255   0
+         0   0 255
+       128 128 128
+         0   0   0];
+p = scatter(x,x,[],RGB/255);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,7);
+assert_checkequal(p.mark_foreground,...
+[color(RGB(1,1),RGB(1,2),RGB(1,3))...
+ color(RGB(2,1),RGB(2,2),RGB(2,3))...
+ color(RGB(3,1),RGB(3,2),RGB(3,3))...
+ color(RGB(4,1),RGB(4,2),RGB(4,3))...
+ color(RGB(5,1),RGB(5,2),RGB(5,3))]);
+assert_checkequal(p.mark_background,0);
+close(h);
diff --git a/scilab/modules/graphics/tests/unit_tests/scatter3.dia.ref b/scilab/modules/graphics/tests/unit_tests/scatter3.dia.ref
new file mode 100644 (file)
index 0000000..e94ace9
--- /dev/null
@@ -0,0 +1,166 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Scilab Enterprises - 2015-2010 - Juergen Koch <juergen.koch@hs-esslingen.de>
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- TEST WITH GRAPHIC -->
+//
+// Test data
+t = 1:200;
+x = t.*cos(t).*sin(t);
+y = t.*sin(t).*sin(t);
+z = t.*cos(t);
+s = linspace(50,1,length(t));
+//
+// Test #1 Create 3D scatter plot 
+h = scf();
+p = scatter3(x,y,z);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,7);
+assert_checkequal(p.mark_foreground,2);
+assert_checkequal(p.mark_background,0);
+set(gca(),"rotation_angles",[60,45]);
+close(h);
+//
+// Test #2 Vary marker size 
+h = scf();
+p = scatter3(x,y,z,s);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,ceil(sqrt(4*s/%pi)));
+assert_checkequal(p.mark_foreground,2);
+assert_checkequal(p.mark_background,0);
+set(gca(),"rotation_angles",[60,45]);
+close(h);
+//
+// Test #3 Vary marker size and color
+h = scf();
+set(gcf(),"color_map",coolcolormap(64));
+p = scatter3(x,y,z,s,t);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,ceil(sqrt(4*s/%pi)));
+assert_checkequal(p.mark_foreground,floor((64-1)*(t-min(t))/(max(t)-min(t))+1));
+assert_checkequal(p.mark_background,0);
+set(gca(),"rotation_angles",[60,45]);
+close(h);
+//
+// Test data
+z = linspace(0,25,200);
+x = z.*cos(z);
+y = z.*sin(z);
+//
+// Test #4 Fill the markers
+h = scf();
+p = scatter3(x,y,z,"fill");
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,7);
+assert_checkequal(p.mark_foreground,2);
+assert_checkequal(p.mark_background,2);
+set(gca(),"rotation_angles",[60,45]);
+close(h);
+//
+// Test #5 Specify marker symbol
+h = scf();
+p = scatter3(x,y,z,"*");
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,10);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,7);
+assert_checkequal(p.mark_foreground,2);
+assert_checkequal(p.mark_background,0);
+set(gca(),"rotation_angles",[60,45]);
+close(h);
+//
+// Test #6 Change marker edge and face color
+h = scf();
+p = scatter3(x,y,z,...
+         "markerEdgeColor","black",...
+         "markerFaceColor",[0 .8 .8]);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,7);
+assert_checkequal(p.mark_foreground,color("black"));
+assert_checkequal(p.mark_background,color(0,.8*255,.8*255));
+set(gca(),"rotation_angles",[60,45]);
+close(h);
+//
+// Test #7 Specify subplot for scatter plot
+h = scf();
+[x,y] = meshgrid(linspace(-2,2,20));
+z = exp(-x.^2-y.^2);
+subplot(2,1,1);
+p1 = scatter3(gca(),x(:),y(:),z(:));
+assert_checkequal(p1.line_mode,"off");
+assert_checkequal(p1.fill_mode,"off");
+assert_checkequal(p1.thickness,1);
+assert_checkequal(p1.mark_mode,"on");
+assert_checkequal(p1.mark_style,9);
+assert_checkequal(p1.mark_size_unit,"point");
+assert_checkequal(p1.mark_size,7);
+assert_checkequal(p1.mark_foreground,2);
+assert_checkequal(p1.mark_background,0);
+set(gca(),"rotation_angles",[60,45]);
+subplot(2,1,2);
+p2 = scatter3(gca(),x(:),y(:),z(:),"markerFaceColor",[0 .8 .8]);
+assert_checkequal(p2.line_mode,"off");
+assert_checkequal(p2.fill_mode,"off");
+assert_checkequal(p2.thickness,1);
+assert_checkequal(p2.mark_mode,"on");
+assert_checkequal(p2.mark_style,9);
+assert_checkequal(p2.mark_size_unit,"point");
+assert_checkequal(p2.mark_size,7);
+assert_checkequal(p2.mark_foreground,2);
+assert_checkequal(p2.mark_background,color(0,.8*255,.8*255));
+set(gca(),"rotation_angles",[60,45]);
+close(h);
+//
+// Test data
+t = 1:200;
+x = t.*cos(t).*sin(t);
+y = t.*sin(t).*sin(t);
+z = t.*cos(t);
+s = linspace(50,1,length(t));
+//
+// Test #8 Modify scatter plot after creation
+h = scf();
+p = scatter3(x,y,z,s);
+p.mark_foreground = addcolor([0.5 0 0]);
+p.mark_background = addcolor([0.5 0.5 0]);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,ceil(sqrt(4*s/%pi)));
+assert_checkequal(p.mark_foreground,color(0.5*255,0,0));
+assert_checkequal(p.mark_background,color(0.5*255,0.5*255,0));
+set(gca(),"rotation_angles",[60,45]);
+close(h);
diff --git a/scilab/modules/graphics/tests/unit_tests/scatter3.tst b/scilab/modules/graphics/tests/unit_tests/scatter3.tst
new file mode 100644 (file)
index 0000000..8b060e5
--- /dev/null
@@ -0,0 +1,173 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Scilab Enterprises - 2015-2010 - Juergen Koch <juergen.koch@hs-esslingen.de>
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- TEST WITH GRAPHIC -->
+
+//
+// Test data
+t = 1:200;
+x = t.*cos(t).*sin(t);
+y = t.*sin(t).*sin(t);
+z = t.*cos(t);
+s = linspace(50,1,length(t));
+
+//
+// Test #1 Create 3D scatter plot 
+h = scf();
+p = scatter3(x,y,z);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,7);
+assert_checkequal(p.mark_foreground,2);
+assert_checkequal(p.mark_background,0);
+set(gca(),"rotation_angles",[60,45]);
+close(h);
+//
+// Test #2 Vary marker size 
+h = scf();
+p = scatter3(x,y,z,s);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,ceil(sqrt(4*s/%pi)));
+assert_checkequal(p.mark_foreground,2);
+assert_checkequal(p.mark_background,0);
+set(gca(),"rotation_angles",[60,45]);
+close(h);
+//
+// Test #3 Vary marker size and color
+h = scf();
+set(gcf(),"color_map",coolcolormap(64));
+p = scatter3(x,y,z,s,t);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,ceil(sqrt(4*s/%pi)));
+assert_checkequal(p.mark_foreground,floor((64-1)*(t-min(t))/(max(t)-min(t))+1));
+assert_checkequal(p.mark_background,0);
+set(gca(),"rotation_angles",[60,45]);
+close(h);
+
+//
+// Test data
+z = linspace(0,25,200);
+x = z.*cos(z);
+y = z.*sin(z);
+
+//
+// Test #4 Fill the markers
+h = scf();
+p = scatter3(x,y,z,"fill");
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,7);
+assert_checkequal(p.mark_foreground,2);
+assert_checkequal(p.mark_background,2);
+set(gca(),"rotation_angles",[60,45]);
+close(h);
+//
+// Test #5 Specify marker symbol
+h = scf();
+p = scatter3(x,y,z,"*");
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,10);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,7);
+assert_checkequal(p.mark_foreground,2);
+assert_checkequal(p.mark_background,0);
+set(gca(),"rotation_angles",[60,45]);
+close(h);
+//
+// Test #6 Change marker edge and face color
+h = scf();
+p = scatter3(x,y,z,...
+         "markerEdgeColor","black",...
+         "markerFaceColor",[0 .8 .8]);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,7);
+assert_checkequal(p.mark_foreground,color("black"));
+assert_checkequal(p.mark_background,color(0,.8*255,.8*255));
+set(gca(),"rotation_angles",[60,45]);
+close(h);
+//
+// Test #7 Specify subplot for scatter plot
+h = scf();
+[x,y] = meshgrid(linspace(-2,2,20));
+z = exp(-x.^2-y.^2);
+subplot(2,1,1);
+p1 = scatter3(gca(),x(:),y(:),z(:));
+assert_checkequal(p1.line_mode,"off");
+assert_checkequal(p1.fill_mode,"off");
+assert_checkequal(p1.thickness,1);
+assert_checkequal(p1.mark_mode,"on");
+assert_checkequal(p1.mark_style,9);
+assert_checkequal(p1.mark_size_unit,"point");
+assert_checkequal(p1.mark_size,7);
+assert_checkequal(p1.mark_foreground,2);
+assert_checkequal(p1.mark_background,0);
+set(gca(),"rotation_angles",[60,45]);
+subplot(2,1,2);
+p2 = scatter3(gca(),x(:),y(:),z(:),"markerFaceColor",[0 .8 .8]);
+assert_checkequal(p2.line_mode,"off");
+assert_checkequal(p2.fill_mode,"off");
+assert_checkequal(p2.thickness,1);
+assert_checkequal(p2.mark_mode,"on");
+assert_checkequal(p2.mark_style,9);
+assert_checkequal(p2.mark_size_unit,"point");
+assert_checkequal(p2.mark_size,7);
+assert_checkequal(p2.mark_foreground,2);
+assert_checkequal(p2.mark_background,color(0,.8*255,.8*255));
+set(gca(),"rotation_angles",[60,45]);
+close(h);
+
+//
+// Test data
+t = 1:200;
+x = t.*cos(t).*sin(t);
+y = t.*sin(t).*sin(t);
+z = t.*cos(t);
+s = linspace(50,1,length(t));
+
+//
+// Test #8 Modify scatter plot after creation
+h = scf();
+p = scatter3(x,y,z,s);
+p.mark_foreground = addcolor([0.5 0 0]);
+p.mark_background = addcolor([0.5 0.5 0]);
+assert_checkequal(p.line_mode,"off");
+assert_checkequal(p.fill_mode,"off");
+assert_checkequal(p.thickness,1);
+assert_checkequal(p.mark_mode,"on");
+assert_checkequal(p.mark_style,9);
+assert_checkequal(p.mark_size_unit,"point");
+assert_checkequal(p.mark_size,ceil(sqrt(4*s/%pi)));
+assert_checkequal(p.mark_foreground,color(0.5*255,0,0));
+assert_checkequal(p.mark_background,color(0.5*255,0.5*255,0));
+set(gca(),"rotation_angles",[60,45]);
+close(h);
index fc58821..75bdfaa 100644 (file)
@@ -1128,6 +1128,24 @@ replot_2.png=2bbd8e5516bcfba00fb343eff77b4736
 rotate_1.png=df252732000d1c17d23c04e038b1b0f3
 rpem_1.png=f1f661c0f1bc866f159ff8e328971f0f
 sca_1.png=26a128db93d82d857191be51313e1d87
+scatter3_1.png=9b348949d288bda98107062d0270774b
+scatter3_2.png=4a070719a0c34ffd0d9dfc4f0bd919fe
+scatter3_3.png=7376f7b0c21af17a1f3012d62b821234
+scatter3_4.png=5ab36b58a7fdd923d2ac8e84195967d4
+scatter3_5.png=ca572a4acd71a866fa7a80e6ae72a0e8
+scatter3_6.png=b235a3f52c03b808c9ddb243ec970273
+scatter3_7.png=b8134c4ddc90b26aca003f783b6e0a1b
+scatter3_8.png=59362044970aa209f405b70a989d51d3
+scatter3_9.png=fffd4e03303056b6a4bbcedd0903a0cd
+scatter_1.png=4f9bcfe033f3f679978a95d46a1d1668
+scatter_2.png=237636079259daa7a0193f047c9b36f7
+scatter_3.png=6a6ea8f88e1c95e9e81f55267fa1a9c5
+scatter_4.png=232fe492d271ff6313c68b3d888252bc
+scatter_5.png=8851ea383bf3c8fbb108599bca6e29da
+scatter_6.png=38ce1594a221f1817c355adcf1e35cf5
+scatter_7.png=9e2bdcf2579bbbc0515268dcc7ebd4d1
+scatter_8.png=b7a40a8bbd7cf29b62b771e3be59b988
+scatter_9.png=bf8c91bf01e0c0d88bdff4690c8dbf51
 scifunc_block_m_1.png=a26368cd2a69c472967105b9d8deb5ed
 sec_1.png=4eff2516ae7932bb126b6e2fa133f046
 sech_1.png=62b827923764aaaf8ce355b0256bef3b
index bd0f5d5..cdc7e2f 100644 (file)
Binary files a/scilab/modules/helptools/images/scatter3_1.png and b/scilab/modules/helptools/images/scatter3_1.png differ
index dbdec31..2f7f28a 100644 (file)
Binary files a/scilab/modules/helptools/images/scatter3_2.png and b/scilab/modules/helptools/images/scatter3_2.png differ
index 874b4ef..b9209b0 100644 (file)
Binary files a/scilab/modules/helptools/images/scatter3_3.png and b/scilab/modules/helptools/images/scatter3_3.png differ
index 2c0646a..951a00a 100644 (file)
Binary files a/scilab/modules/helptools/images/scatter3_4.png and b/scilab/modules/helptools/images/scatter3_4.png differ
index 7b58f52..61319d9 100644 (file)
Binary files a/scilab/modules/helptools/images/scatter3_5.png and b/scilab/modules/helptools/images/scatter3_5.png differ
index 3d514b2..3dfe052 100644 (file)
Binary files a/scilab/modules/helptools/images/scatter3_6.png and b/scilab/modules/helptools/images/scatter3_6.png differ
index 95e122d..f45b4cd 100644 (file)
Binary files a/scilab/modules/helptools/images/scatter3_7.png and b/scilab/modules/helptools/images/scatter3_7.png differ
index dbdec31..2f7f28a 100644 (file)
Binary files a/scilab/modules/helptools/images/scatter3_8.png and b/scilab/modules/helptools/images/scatter3_8.png differ
index aec5151..ccd0340 100644 (file)
Binary files a/scilab/modules/helptools/images/scatter3_9.png and b/scilab/modules/helptools/images/scatter3_9.png differ
index d88b9d7..69cdfe8 100644 (file)
Binary files a/scilab/modules/helptools/images/scatter_1.png and b/scilab/modules/helptools/images/scatter_1.png differ
index 69d05c2..a730c32 100644 (file)
Binary files a/scilab/modules/helptools/images/scatter_2.png and b/scilab/modules/helptools/images/scatter_2.png differ
index b2ffaf8..be8eb95 100644 (file)
Binary files a/scilab/modules/helptools/images/scatter_3.png and b/scilab/modules/helptools/images/scatter_3.png differ
index 98750ea..31bc618 100644 (file)
Binary files a/scilab/modules/helptools/images/scatter_4.png and b/scilab/modules/helptools/images/scatter_4.png differ
index 0692928..5576768 100644 (file)
Binary files a/scilab/modules/helptools/images/scatter_5.png and b/scilab/modules/helptools/images/scatter_5.png differ
index 443a159..f485c8b 100644 (file)
Binary files a/scilab/modules/helptools/images/scatter_6.png and b/scilab/modules/helptools/images/scatter_6.png differ
index 2e39869..3a79bf7 100644 (file)
Binary files a/scilab/modules/helptools/images/scatter_7.png and b/scilab/modules/helptools/images/scatter_7.png differ
index 04d7014..2dd4665 100644 (file)
Binary files a/scilab/modules/helptools/images/scatter_8.png and b/scilab/modules/helptools/images/scatter_8.png differ
index 45e0369..38b652f 100644 (file)
Binary files a/scilab/modules/helptools/images/scatter_9.png and b/scilab/modules/helptools/images/scatter_9.png differ
index 69af0e4..e4234ad 100644 (file)
@@ -373,8 +373,7 @@ function [] = %_save(%__filename__, varargin)
         "clip_state", ...
         "clip_box", ...
         "user_data", ...
-        "colors", ...
-        "sizes"]);
+        "colors"]);
 
         fields = fieldnames(returnedPolyline);
 
index cf75812..5f46830 100755 (executable)
@@ -602,19 +602,22 @@ public class DrawerVisitor implements Visitor, Drawer, GraphicView {
                         ElementsBuffer positions = dataManager.getVertexBuffer(polyline.getIdentifier());
                         int offset = polyline.getMarkOffset();
                         int stride = polyline.getMarkStride();
-                        if (polyline.getColorSet() && (polyline.getMark().getBackground() == -3 || polyline.getMark().getForeground() == -3)) {
+                        if (polyline.getColorSet() && (polyline.getNumMarkForegrounds() > 0) || (polyline.getNumMarkBackgrounds() > 0)) {
                             ElementsBuffer colors = dataManager.getColorBuffer(polyline.getIdentifier());
                             Color auxColor;
-                            if (polyline.getMark().getBackground() == -3) {
+                            if (polyline.getNumMarkBackgrounds() > 0) {
                                 auxColor = ColorFactory.createColor(colorMap, polyline.getMark().getForeground());
                             } else {
                                 auxColor = ColorFactory.createColor(colorMap, polyline.getMark().getBackground());
                             }
                                        FloatBuffer data = positions.getData();
                                        FloatBuffer colorData = colors.getData();
-                               Integer[] sizes = polyline.getSizeSet();
-                               if ( (sizes != null) && (data != null) && (colorData != null) && (polyline.getMark().getSize() == -3) && (positions.getSize() == sizes.length) && (colors.getSize() == sizes.length) ) {
-                                       // markers with different sizes
+                               Integer[] sizes = polyline.getMarkSizes();
+                               if ( (sizes.length > 0) && (data != null) && (colorData != null) && (positions.getSize() == sizes.length) && (colors.getSize() == sizes.length) ) {
+                                       
+                                               Integer markSizeTmp = polyline.getMarkSize();
+                                               
+                                               // markers with different sizes
                                                        data.rewind();
                                                        colorData.rewind();
                                                        
@@ -627,7 +630,8 @@ public class DrawerVisitor implements Visitor, Drawer, GraphicView {
                                                        
                                     while (data.remaining() >= stride * elementSize) {
                                                        
-                                                       polyline.setMarkSize(sizes[k++]);
+                                       // Be careful, do not use polyline.setMarkSize since this will destroy the sizes
+                                                       polyline.getMark().setSize(sizes[k++]);
 
                                                        BuffersManager bufferManager = drawingTools.getCanvas().getBuffersManager();
                                                        ElementsBuffer singlePosition = bufferManager.createElementsBuffer();
@@ -653,15 +657,19 @@ public class DrawerVisitor implements Visitor, Drawer, GraphicView {
                                                        bufferManager.dispose(singlePosition);
                                                }
                                                // restore the size of the mark
-                                               polyline.setMarkSize(-3);
+                                       // Be careful, do not use polyline.setMarkSize since this will destroy the sizes
+                                                       polyline.getMark().setSize(markSizeTmp);
                                } else {
                                 Texture sprite = markManager.getMarkSprite(polyline, null, appearance);
                                        drawingTools.draw(sprite, AnchorPosition.CENTER, positions, offset, stride, 0, auxColor, colors);
                                }
                         } else {
                                FloatBuffer data = positions.getData();
-                               Integer[] sizes = polyline.getSizeSet();
-                               if ( (sizes != null) && (data != null) && (polyline.getMark().getSize() == -3) && (positions.getSize() == sizes.length) ) {
+                               Integer[] sizes = polyline.getMarkSizes();
+                               if ( (sizes.length > 0) && (data != null) && (positions.getSize() == sizes.length) ) {
+                                       
+                                       Integer markSizeTmp = polyline.getMarkSize();
+                                       
                                        // markers with different sizes
                                                data.rewind();
                                                
@@ -674,7 +682,8 @@ public class DrawerVisitor implements Visitor, Drawer, GraphicView {
                                                
                                 while (data.remaining() >= stride * elementSize) {
                                                
-                                                       polyline.setMarkSize(sizes[k++]);
+                                       // setting the size of the mark temporary 
+                                                       polyline.getMark().setSize(sizes[k++]);
 
                                                        BuffersManager bufferManager = drawingTools.getCanvas().getBuffersManager();
                                                ElementsBuffer singlePosition = bufferManager.createElementsBuffer();
@@ -691,7 +700,7 @@ public class DrawerVisitor implements Visitor, Drawer, GraphicView {
                                                bufferManager.dispose(singlePosition);
                                        }
                                        // restore the size of the mark
-                                       polyline.setMarkSize(-3);
+                                       polyline.getMark().setSize(markSizeTmp);
                                }
                                else {
                                        Texture sprite = markManager.getMarkSprite(polyline, colorMap, appearance);
index 8213918..c907689 100644 (file)
@@ -119,8 +119,9 @@ public class MarkSpriteManager {
                 || property == GraphicObjectProperties.__GO_LINE_THICKNESS__
                 || property == GraphicObjectProperties.__GO_SELECTED__
                 || property == GraphicObjectProperties.__GO_COLOR_SET__
-                || property == GraphicObjectProperties.__GO_SIZES__
-                       || property == GraphicObjectProperties.__GO_NUM_SIZES__) {
+                || property == GraphicObjectProperties.__GO_MARK_SIZES__
+                || property == GraphicObjectProperties.__GO_MARK_FOREGROUNDS__
+                       || property == GraphicObjectProperties.__GO_MARK_BACKGROUNDS__) {
             dispose(id);
         }
     }