# HG changeset patch # User dbateman # Date 1177542388 0 # Node ID cb3f6d51b7b349b67f391d17bd692955efdc6060 # Parent 1a414f6706359939006a79240e0cacff52bb8ab8 [project @ 2007-04-25 23:06:28 by dbateman] diff -r 1a414f670635 -r cb3f6d51b7b3 scripts/ChangeLog --- a/scripts/ChangeLog Wed Apr 25 22:35:22 2007 +0000 +++ b/scripts/ChangeLog Wed Apr 25 23:06:28 2007 +0000 @@ -1,3 +1,9 @@ +2007-04-26 David Bateman + + * plot/hist.m: Support returning of handle + * plot/__bar__.m: __pltopt__ should only be called on strings or + cells. + 2007-04-25 John W. Eaton * plot/__go_draw_axes__.m: For images, set titlespec{data_idx} to diff -r 1a414f670635 -r cb3f6d51b7b3 scripts/plot/__bar__.m --- a/scripts/plot/__bar__.m Wed Apr 25 22:35:22 2007 +0000 +++ b/scripts/plot/__bar__.m Wed Apr 25 23:06:28 2007 +0000 @@ -74,7 +74,7 @@ group = false; idx++; else - if (!HaveLineSpec) + if ((isstr(varargin{idx}) || iscell(varargin{idx})) && !HaveLineSpec) [dummy, valid] = __pltopt__ (func, varargin{idx}, false); if (valid) HaveLineSpec = true; diff -r 1a414f670635 -r cb3f6d51b7b3 scripts/plot/hist.m --- a/scripts/plot/hist.m Wed Apr 25 22:35:22 2007 +0000 +++ b/scripts/plot/hist.m Wed Apr 25 23:06:28 2007 +0000 @@ -118,7 +118,7 @@ freq = freq / rows (y) * norm; endif - if (nargout > 0) + if (nargout > 1) if (arg_is_vector) nn = freq'; xx = x'; @@ -126,8 +126,10 @@ nn = freq; xx = x; endif + elseif (nargout == 1) + nn = bar (x, freq, 1.0); else - bar (x, freq); + bar (x, freq, 1.0); endif endfunction