Mercurial > hg > octave-shane
changeset 7249:87b5a3fb5286
[project @ 2007-12-04 18:04:23 by jwe]
author | jwe |
---|---|
date | Tue, 04 Dec 2007 18:04:23 +0000 |
parents | ffca9912dc82 |
children | 0ff0883fb121 |
files | scripts/plot/shading.m |
diffstat | 1 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/shading.m +++ b/scripts/plot/shading.m @@ -27,21 +27,22 @@ ## Author: Kai Habel <kai.habel@gmx.de> -function shading (ax, mode) +## PKG_ADD: mark_as_command shading - if (nargin == 1) - mode = ax; - ax = gca (); - endif +function shading (varargin) + + [ax, varargin] = __plt_get_axis_arg__ ("shading", varargin{:}); if (nargin != 1 && nargin != 2) print_usage (); endif + mode = varargin{1}; + h1 = findobj (ax, "type", "patch"); h2 = findobj (ax, "type", "surface"); - obj = [h1, h2]; + obj = [h1(:); h2(:)]; for n = 1:numel(obj) h = obj(n);