Mercurial > hg > octave-lyh
changeset 6582:cb3f6d51b7b3
[project @ 2007-04-25 23:06:28 by dbateman]
author | dbateman |
---|---|
date | Wed, 25 Apr 2007 23:06:28 +0000 |
parents | 1a414f670635 |
children | e4ef75fe0bf2 |
files | scripts/ChangeLog scripts/plot/__bar__.m scripts/plot/hist.m |
diffstat | 3 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,9 @@ +2007-04-26 David Bateman <dbateman@free.fr> + + * 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 <jwe@octave.org> * plot/__go_draw_axes__.m: For images, set titlespec{data_idx} to
--- a/scripts/plot/__bar__.m +++ b/scripts/plot/__bar__.m @@ -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;
--- a/scripts/plot/hist.m +++ b/scripts/plot/hist.m @@ -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