Mercurial > octave-nkf
diff scripts/plot/cla.m @ 17125:b5d6314314fc
Change various plot functions to take advantage of new isaxes() function.
* scripts/geometry/voronoi.m, scripts/image/imagesc.m,
scripts/plot/__plt_get_axis_arg__.m, scripts/plot/axes.m, scripts/plot/cla.m,
scripts/plot/colorbar.m, scripts/plot/hold.m, scripts/plot/legend.m,
scripts/plot/plotmatrix.m, scripts/plot/plotyy.m,
scripts/plot/private/__errplot__.m, scripts/plot/private/__plt__.m,
scripts/plot/view.m: Use new isaxes function to simplify code.
* scripts/plot/shading.m: Use Octave convention for spacing of parentheses.
* scripts/plot/zlabel.m: Correct %!test incorrectly calling plot3 with figure
handle.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 31 Jul 2013 16:27:49 -0700 |
parents | eaab03308c0b |
children | bc924baa2c4e |
line wrap: on
line diff
--- a/scripts/plot/cla.m Wed Jul 31 16:23:53 2013 -0700 +++ b/scripts/plot/cla.m Wed Jul 31 16:27:49 2013 -0700 @@ -47,8 +47,7 @@ hax = gca; do_reset = false; elseif (nargin == 1) - if (isscalar (varargin{1}) && ishandle (varargin{1}) - && strcmp (get (varargin{1}, "type"), "axes")) + if (isscalar (varargin{1}) && isaxes (varargin{1})) hax = varargin{1}; do_reset = false; elseif (ischar (varargin{1}) && strcmpi (varargin{1}, "reset")) @@ -58,8 +57,7 @@ print_usage (); endif else - if (isscalar (varargin{1}) && ishandle (varargin{1}) - && strcmp (get (varargin{1}, "type"), "axes") + if (isscalar (varargin{1}) && isaxes (varargin{1}) && ischar (varargin{2}) && strcmpi (varargin{2}, "reset")) hax = varargin{1}; do_reset = true;