Mercurial > octave
changeset 18754:4ca40b289b2c stable
isaxes.m: Fix bug where some inputs do not show up in outputs (bug #42362).
* isaxes.m: Keep input vector size. Test added.
author | Stefan Mahr <dac922@gmx.de> |
---|---|
date | Wed, 14 May 2014 23:58:23 +0200 |
parents | e5ab507687ee |
children | 6cd4d0af8547 |
files | scripts/plot/util/isaxes.m |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/util/isaxes.m Thu May 08 10:59:21 2014 -0700 +++ b/scripts/plot/util/isaxes.m Wed May 14 23:58:23 2014 +0200 @@ -35,10 +35,10 @@ endif hlist = ishandle (h); + retval = hlist; + if (any (hlist)) retval(hlist) = strcmp (get (h(hlist), "type"), "axes"); - else - retval = hlist; endif endfunction @@ -54,3 +54,11 @@ %! close (hf); %! end_unwind_protect +%!test +%! hf = figure ("visible", "off"); +%! unwind_protect +%! hax = axes (); +%! assert (isaxes ([hax NaN]), [true false]); +%! unwind_protect_cleanup +%! close (hf); +%! end_unwind_protect