diff scripts/plot/plot3.m @ 8075:a028a5960e18

Fix for hold with no figures/axes. Set prop/val pairs to hggroups rather than underlying objects. Fix for equality test in array_property
author David Bateman <dbateman@free.fr>
date Fri, 29 Aug 2008 15:48:44 -0400
parents 3b53b25e2550
children 4665276ff7f6
line wrap: on
line diff
--- a/scripts/plot/plot3.m
+++ b/scripts/plot/plot3.m
@@ -180,9 +180,17 @@
 	color = __next_line_color__ ();
       endif
 
-      tmp(++idx) = line (x(:), y(:), z(:),  "keylabel", key, "color", color,
-			 "linestyle", options.linestyle,
-			 "marker", options.marker, properties{:});
+      hg = hggroup ();
+      tmp(++idx) = hg;
+      properties = __add_datasource__ ("plot3", hg, {"x", "y", "z"}, properties{:});
+
+      hline = line (x(:), y(:), z(:),  "keylabel", key, "color", color,
+		    "linestyle", options.linestyle,
+		    "marker", options.marker, "parent", hg);
+
+      __add_line_series__ (hline, hg);
+
+      set (hg, properties{:});
 
       x_set = 0;
       y_set = 0;
@@ -231,9 +239,11 @@
 
       hline = line (x(:), y(:), z(:),  "keylabel", key, "color", color,
 		    "linestyle", options.linestyle,
-		    "marker", options.marker, "parent", hg, properties{:});
+		    "marker", options.marker, "parent", hg);
 
-      __add_line_series__ (h, hg);
+      __add_line_series__ (hline, hg);
+
+      set (hg, properties{:});
 
       x = new;
       y_set = 0;
@@ -301,9 +311,10 @@
 
     hline = line (x(:), y(:), z(:),  "keylabel", key, "color", color,
 		  "linestyle", options.linestyle,
-		  "marker", options.marker, "parent", hg, properties{:});
+		  "marker", options.marker, "parent", hg);
 
-    __add_line_series__ (h, hg);
+    __add_line_series__ (hline, hg);
+
   endif
 
   set (gca (), "view", [-37.5, 30]);