Mercurial > hg > octave-nkf
changeset 20199: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 | 7569e880d56c |
children | 26a4ed0c9c5b |
files | scripts/plot/util/print.m |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/util/print.m +++ b/scripts/plot/util/print.m @@ -301,6 +301,10 @@ error ("print: no figure to print"); endif + if (isempty (findall (opts.figure, "-depth", "1", "type", "axes"))) + error ("print: no axes object in figure to print"); + endif + orig_figure = get (0, "currentfigure"); set (0, "currentfigure", opts.figure);