Mercurial > hg > octave-lojdl
changeset 8236:7799d8c38312
Small plotting fixes
author | David Bateman <dbateman@free.fr> |
---|---|
date | Fri, 17 Oct 2008 16:06:32 +0100 |
parents | 7eedf503ba1c |
children | 52f2fba4f3f8 |
files | scripts/ChangeLog scripts/plot/__plt_get_axis_arg__.m scripts/plot/colorbar.m scripts/plot/comet.m scripts/plot/contourc.m |
diffstat | 5 files changed, 15 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,11 @@ +2008-10-17 David Bateman <dbateman@free.fr> + + * plot/__plt_get_axis_arg__.m: Exclude non-numeric and root figure + from potential axis handles. + * plot/colorbar.m: Remove debug output. + * plot/comet.m: Close plot before demo + * plot/contourc.m: No output if nargout == 0. + 2008-10-16 David Bateman <dbateman@free.fr> * plot/subplot.m: Allow for column vector of children for figure.
--- a/scripts/plot/__plt_get_axis_arg__.m +++ b/scripts/plot/__plt_get_axis_arg__.m @@ -32,8 +32,9 @@ ## Figure handles are integers, but object handles are non integer, ## therefore ignore integer scalars. - if (nargin > 1 && length (varargin) > 0 && numel(varargin{1}) == 1 - && ishandle (varargin{1}(1)) && ! isfigure (varargin{1}(1))) + if (nargin > 1 && length (varargin) > 0 && isnumeric (varargin{1}) + && numel (varargin{1}) == 1 && ishandle (varargin{1}(1)) + && varargin{1}(1) != 0 && ! isfigure (varargin{1}(1))) tmp = varargin{1}; obj = get (tmp); if (strcmp (obj.type, "axes") || strcmp (obj.type, "hggroup"))
--- a/scripts/plot/colorbar.m +++ b/scripts/plot/colorbar.m @@ -236,7 +236,6 @@ endif if (! isnan (aspect)) - aspect set (cax, "dataaspectratio", aspect); endif endif
--- a/scripts/plot/comet.m +++ b/scripts/plot/comet.m @@ -79,6 +79,7 @@ endfunction %!demo +%! close all; %! t = 0:.1:2*pi; %! x = cos(2*t).*(cos(t).^2); %! y = sin(2*t).*(sin(t).^2);
--- a/scripts/plot/contourc.m +++ b/scripts/plot/contourc.m @@ -57,7 +57,7 @@ ## Author: Shai Ayal <shaiay@users.sourceforge.net> -function [c, lev] = contourc (varargin) +function [cout, lev] = contourc (varargin) if (nargin == 1) vn = 10; @@ -127,7 +127,8 @@ endwhile endif - if (nargout == 2) + if (nargout > 0) + cout = c; lev = vv; endif