diff scripts/plot/appearance/legend.m @ 22069:9121d6584f6a

Overhaul graphics implementation of hold() (bug #43559). * NEWS: Announce possible color changes in plots relying on "hold on". * hold.m: Deprecate "hold all" in docstring. Eliminate use of __hold_all__ graphics property. Update %!demo to use "hold on" only. * ishold.m: Put input validation first. Use switch statement rather than if/else tree for clarity. * graphics.in.h: Remove hidden __hold_all__ graphics property of axes. * graphics.cc (axes::properties::set_defaults): Remove use of __hold_all__. * newplot.m: Delete kluge use of __next_line_color__ and __next_line_style__. Set colororderindex and linestyleorderindex to 1 on new plots. * __next_line_color__.m: Completely rewrite to use the axes graphic property "colororderindex" to keep track of which color should be used next. Also increment "linestyleorderindex" when number of colors used rolls over so that colors will repeat with the next linestyle in the series. Update BIST test. * __next_line_style__.m: Completely rewrite to use the axes graphic property "linestyleorderindex" to keep track of which linestyle should be used next. * imagesc.m, axis.m, legend.m: Replace "hold all" with "hold on" in all demos.
author Rik <rik@octave.org>
date Thu, 07 Jul 2016 13:07:03 -0700
parents 55e2979e1fd1
children 283d8dfcad37
line wrap: on
line diff
--- a/scripts/plot/appearance/legend.m	Thu Jul 07 12:15:46 2016 -0700
+++ b/scripts/plot/appearance/legend.m	Thu Jul 07 13:07:03 2016 -0700
@@ -1399,7 +1399,7 @@
 %! clf;
 %! x = 0:0.1:10;
 %! plot (x, sin (x), ';sin (x);');
-%! hold all;
+%! hold on;
 %! plot (x, cos (x), ';cos (x);');
 %! hold off;
 %! title ('legend constructed from multiple plot calls');
@@ -1408,7 +1408,7 @@
 %! clf;
 %! x = 0:0.1:10;
 %! plot (x, sin (x), ';sin (x);');
-%! hold all;
+%! hold on;
 %! plot (x, cos (x), ';cos (x);');
 %! hold off;
 %! title ('Specified label text overrides previous labels');