diff scripts/plot/util/print.m @ 30362:512f3d68bb49 stable

print: Use clearer error message on invalid input (bug #61557). * scripts/plot/util/private/__print_parse_opts__.m: Use clearer error message on invalid input. * scripts/plot/util/print.m: Add BIST.
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 25 Nov 2021 15:05:26 +0100
parents 212461a26e9c
children 363fb10055df
line wrap: on
line diff
--- a/scripts/plot/util/print.m	Thu Nov 25 15:03:10 2021 +0100
+++ b/scripts/plot/util/print.m	Thu Nov 25 15:05:26 2021 +0100
@@ -808,6 +808,18 @@
 
 endfunction
 
+%!error <a graphics handle>
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   x = 0:0.1:1;
+%!   y1 = x;
+%!   y2 = 2*x;
+%!   ax = plotyy (x, y1, x, y2);
+%!   saveas (ax, [tempname(), ".png"]);
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
+
 function cmd = epstool (opts, filein, fileout)
   ## As epstool does not work with pipes, a subshell is used to
   ## permit piping.  Since this solution does not work with the DOS