Mercurial > octave
comparison scripts/plot/util/print.m @ 19990:9a2d8b1f931e
Issue error when trying to print a figure with no axes object (bug #44655).
* print.m: Check for an axes object as a child of the figure object to be
printed.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 28 Mar 2015 20:03:00 -0700 |
parents | 9fc020886ae9 |
children | 777f26aa8e3e |
comparison
equal
deleted
inserted
replaced
19989:7569e880d56c | 19990:9a2d8b1f931e |
---|---|
297 opts.lpr_cmd = @lpr; | 297 opts.lpr_cmd = @lpr; |
298 opts.epstool_cmd = @epstool; | 298 opts.epstool_cmd = @epstool; |
299 | 299 |
300 if (isempty (opts.figure) || ! isfigure (opts.figure)) | 300 if (isempty (opts.figure) || ! isfigure (opts.figure)) |
301 error ("print: no figure to print"); | 301 error ("print: no figure to print"); |
302 endif | |
303 | |
304 if (isempty (findall (opts.figure, "-depth", "1", "type", "axes"))) | |
305 error ("print: no axes object in figure to print"); | |
302 endif | 306 endif |
303 | 307 |
304 orig_figure = get (0, "currentfigure"); | 308 orig_figure = get (0, "currentfigure"); |
305 set (0, "currentfigure", opts.figure); | 309 set (0, "currentfigure", opts.figure); |
306 | 310 |