comparison scripts/plot/plot3.m @ 8070:3b53b25e2550

Add data sources and line series
author David Bateman <dbateman@free.fr>
date Thu, 28 Aug 2008 12:23:54 -0400
parents 5e90111a28b3
children a028a5960e18
comparison
equal deleted inserted replaced
8069:c64c9581e9bf 8070:3b53b25e2550
223 color = options.color; 223 color = options.color;
224 if (isempty (color)) 224 if (isempty (color))
225 color = __next_line_color__ (); 225 color = __next_line_color__ ();
226 endif 226 endif
227 227
228 tmp(++idx) = line (x(:), y(:), z(:), "keylabel", key, "color", color, 228 hg = hggroup ();
229 "linestyle", options.linestyle, 229 tmp(++idx) = hg;
230 "marker", options.marker, properties{:}); 230 properties = __add_datasource__ ("plot3", hg, {"x", "y", "z"}, properties{:});
231
232 hline = line (x(:), y(:), z(:), "keylabel", key, "color", color,
233 "linestyle", options.linestyle,
234 "marker", options.marker, "parent", hg, properties{:});
235
236 __add_line_series__ (h, hg);
231 237
232 x = new; 238 x = new;
233 y_set = 0; 239 y_set = 0;
234 z_set = 0; 240 z_set = 0;
235 fmt_set = 0; 241 fmt_set = 0;
287 color = options.color; 293 color = options.color;
288 if (isempty (color)) 294 if (isempty (color))
289 color = __next_line_color__ (); 295 color = __next_line_color__ ();
290 endif 296 endif
291 297
292 tmp(++idx) = line (x(:), y(:), z(:), "keylabel", key, "color", color, 298 hg = hggroup ();
293 "linestyle", options.linestyle, 299 tmp(++idx) = hg;
294 "marker", options.marker, properties{:}); 300 properties = __add_datasource__ ("plot3", hg, {"x", "y", "z"}, properties{:});
301
302 hline = line (x(:), y(:), z(:), "keylabel", key, "color", color,
303 "linestyle", options.linestyle,
304 "marker", options.marker, "parent", hg, properties{:});
305
306 __add_line_series__ (h, hg);
295 endif 307 endif
296 308
297 set (gca (), "view", [-37.5, 30]); 309 set (gca (), "view", [-37.5, 30]);
298 310
299 if (nargout > 0 && idx > 0) 311 if (nargout > 0 && idx > 0)