Mercurial > hg > octave-nkf
diff scripts/plot/stairs.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 | 082fa7859574 |
line wrap: on
line diff
--- a/scripts/plot/stairs.m +++ b/scripts/plot/stairs.m @@ -146,10 +146,6 @@ h = [h; hg]; args = __add_datasource__ ("stairs", hg, {"x", "y"}, varargin{:}); - if (i == 1) - set (gca (), "nextplot", "add"); - endif - addproperty ("xdata", hg, "data", x(:,i).'); addproperty ("ydata", hg, "data", y(:,i).'); @@ -157,8 +153,8 @@ addlistener (hg, "ydata", @update_data); tmp = line (xs(:,i).', ys(:,i).', "color", __next_line_color__ (), - "parent", hg, args{:}); - + "parent", hg); + addproperty ("color", hg, "linecolor", get (tmp, "color")); addproperty ("linewidth", hg, "linelinewidth", get (tmp, "linewidth")); addproperty ("linestyle", hg, "linelinestyle", get (tmp, "linestyle")); @@ -178,6 +174,8 @@ addlistener (hg, "markerfacecolor", @update_props); addlistener (hg, "markeredgecolor", @update_props); addlistener (hg, "markersize", @update_props); + + set (hg, args{:}); endfor unwind_protect_cleanup set (gca (), "nextplot", hold_state);