Mercurial > hg > octave-lyh
comparison scripts/plot/patch.m @ 7177:57d2546ad8d5
[project @ 2007-11-14 22:21:35 by jwe]
author | jwe |
---|---|
date | Wed, 14 Nov 2007 22:21:36 +0000 |
parents | 121841c08c25 |
children | a730e47fda4d |
comparison
equal
deleted
inserted
replaced
7176:6525eb2fba0f | 7177:57d2546ad8d5 |
---|---|
36 | 36 |
37 function h = patch (varargin) | 37 function h = patch (varargin) |
38 | 38 |
39 if (isscalar (varargin{1}) && ishandle (varargin{1})) | 39 if (isscalar (varargin{1}) && ishandle (varargin{1})) |
40 h = varargin {1}; | 40 h = varargin {1}; |
41 if (! strcmp (get (h, "type"), "axes")) | 41 if (! strcmp (get (h, "type"), "axes") && ! strcmp (get (h, "type"), "hggroup")) |
42 error ("patch: expecting first argument to be an axes object"); | 42 error ("patch: expecting first argument to be an axes or hggroup object"); |
43 endif | 43 endif |
44 oldh = gca (); | 44 oldh = gca (); |
45 unwind_protect | 45 unwind_protect |
46 axes (h); | 46 axes (ancestor (h, "axes")); |
47 [tmp, fail] = __patch__ (h, varargin{2:end}); | 47 [tmp, fail] = __patch__ (h, varargin{2:end}); |
48 unwind_protect_cleanup | 48 unwind_protect_cleanup |
49 axes (oldh); | 49 axes (oldh); |
50 end_unwind_protect | 50 end_unwind_protect |
51 else | 51 else |