Mercurial > hg > octave-lyh
changeset 7187:1124c84fc63d
[project @ 2007-11-26 20:24:47 by jwe]
author | jwe |
---|---|
date | Mon, 26 Nov 2007 20:24:47 +0000 |
parents | 800f1fd3ffb8 |
children | fdd7cd70dc14 |
files | scripts/plot/cylinder.m |
diffstat | 1 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/cylinder.m +++ b/scripts/plot/cylinder.m @@ -47,16 +47,15 @@ nargs = nargin; args = varargin; + ax = []; - if (nargs > 1 && isscalar (varargin{1}) && ishandle (varargin{1})) - if (! strcmp (get (varargin{1}, "type"), "axes")) + if (nargs > 0 && isscalar (args{1}) && ishandle (args{1})) + if (! strcmp (get (args{1}, "type"), "axes")) error ("cylinder: expecting first argument to be an axes object"); endif - ax = h; + ax = args{1}; nargs--; args(1) = []; - else - ax = gca (); endif if (nargs == 0) @@ -88,7 +87,9 @@ yy = y; zz = z; else - axes(ax); + if (! isempty (ax)) + axes (ax); + endif surf (x, y, z); endif