Mercurial > hg > octave-lojdl
changeset 7664:0dff8d9bf229
Fix for plot(zeros(1,0),zeros(1,0))
author | David Bateman <dbateman@free.fr> |
---|---|
date | Fri, 28 Mar 2008 12:51:14 -0400 |
parents | c00d467bef6b |
children | aead4b9d026b |
files | scripts/ChangeLog scripts/plot/__plt2__.m |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2008-03-27 David Bateman <dbateman@free.fr> + + * plot/__plt2__.m: Test if args are empty first so that + plot(zeros(1,0),zeros(1,0)) works as expected. + 2008-03-27 Bill Denney <bill@denney.ws> * time/datenum.m: Allow vector inputs in any orientation.
--- a/scripts/plot/__plt2__.m +++ b/scripts/plot/__plt2__.m @@ -48,7 +48,9 @@ endif h_set = false; - if (isscalar (x1)) + if (isempty (x1) && isempty (x2)) + retval = zeros (0, 1); + elseif (isscalar (x1)) if (isscalar (x2)) retval = __plt2ss__ (h, x1, x2, options, properties); elseif (isvector (x2)) @@ -74,8 +76,6 @@ else error ("__plt2__: invalid data for plotting"); endif - elseif (isempty (x1) && isempty (x2)) - retval = zeros (0, 1); else error ("__plt2__: invalid data for plotting"); endif