# HG changeset patch # User David Bateman # Date 1206723074 14400 # Node ID 0dff8d9bf2297a731a04ce6ae2144f4876f9426b # Parent c00d467bef6b69863fdac6adcdbbae68f2d28019 Fix for plot(zeros(1,0),zeros(1,0)) diff -r c00d467bef6b -r 0dff8d9bf229 scripts/ChangeLog --- a/scripts/ChangeLog Thu Mar 27 22:26:57 2008 -0400 +++ b/scripts/ChangeLog Fri Mar 28 12:51:14 2008 -0400 @@ -1,3 +1,8 @@ +2008-03-27 David Bateman + + * 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 * time/datenum.m: Allow vector inputs in any orientation. diff -r c00d467bef6b -r 0dff8d9bf229 scripts/plot/__plt2__.m --- a/scripts/plot/__plt2__.m Thu Mar 27 22:26:57 2008 -0400 +++ b/scripts/plot/__plt2__.m Fri Mar 28 12:51:14 2008 -0400 @@ -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