Mercurial > hg > octave-nkf
diff scripts/plot/legend.m @ 16973:d429a05dc11c
legend.m: Move %!test block below %!demo blocks per standard usage.
* scripts/plot/legend.m: Move %!test block below %!demo blocks per standard
usage.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 13 Jul 2013 10:44:40 -0700 |
parents | e39f00a32dc7 |
children | 991e8a386aa3 |
line wrap: on
line diff
--- a/scripts/plot/legend.m +++ b/scripts/plot/legend.m @@ -1180,20 +1180,6 @@ endif endfunction -%!test -%! graphics_toolkit ("gnuplot"); -%! h = figure ("visible", "off", "__graphics_toolkit__", "gnuplot"); -%! unwind_protect -%! position = get (h, "position"); -%! plot (rand (3)) -%! legend () -%! filename = sprintf ("%s.eps", tmpnam ()); -%! print (filename) -%! unlink (filename); -%! assert (get (h, "position"), position) -%! unwind_protect_cleanup -%! close (h) -%! end_unwind_protect %!demo %! clf; @@ -1557,3 +1543,18 @@ %! legend ({'12345678901234567890'}, 'location', 'southwestoutside'); %! legend (option); +%!test +%! graphics_toolkit ("gnuplot"); +%! h = figure ("visible", "off", "__graphics_toolkit__", "gnuplot"); +%! unwind_protect +%! position = get (h, "position"); +%! plot (rand (3)); +%! legend (); +%! filename = sprintf ("%s.eps", tmpnam ()); +%! print (filename); +%! unlink (filename); +%! assert (get (h, "position"), position); +%! unwind_protect_cleanup +%! close (h); +%! end_unwind_protect +