Mercurial > octave-nkf
comparison scripts/plot/ishold.m @ 10549:95c3e38098bf
Untabify .m scripts
author | Rik <code@nomad.inbox5.com> |
---|---|
date | Fri, 23 Apr 2010 11:28:50 -0700 |
parents | e381f80a5f7a |
children | d1978e7364ad |
comparison
equal
deleted
inserted
replaced
10548:479536c5bb10 | 10549:95c3e38098bf |
---|---|
28 ax = gca (); | 28 ax = gca (); |
29 fig = gcf (); | 29 fig = gcf (); |
30 elseif (nargin == 1) | 30 elseif (nargin == 1) |
31 if (ishandle (h)) | 31 if (ishandle (h)) |
32 if (isfigure (h)) | 32 if (isfigure (h)) |
33 ax = get (h, "currentaxes"); | 33 ax = get (h, "currentaxes"); |
34 if (isempty (ax)) | 34 if (isempty (ax)) |
35 ax = __go_axes__ (h); | 35 ax = __go_axes__ (h); |
36 set (h, "currentaxes", ax); | 36 set (h, "currentaxes", ax); |
37 endif | 37 endif |
38 fig = h; | 38 fig = h; |
39 elseif (strcmpi (get (h, "type"), "axes")) | 39 elseif (strcmpi (get (h, "type"), "axes")) |
40 ax = h; | 40 ax = h; |
41 fig = get (h, "parent"); | 41 fig = get (h, "parent"); |
42 else | 42 else |
43 error ("hold: expecting argument to be axes or figure graphics handle"); | 43 error ("hold: expecting argument to be axes or figure graphics handle"); |
44 endif | 44 endif |
45 else | 45 else |
46 error ("hold: expecting argument to be axes or figure graphics handle"); | 46 error ("hold: expecting argument to be axes or figure graphics handle"); |
47 endif | 47 endif |
48 else | 48 else |
49 print_usage (); | 49 print_usage (); |
50 endif | 50 endif |
51 | 51 |
52 retval = (strcmpi (get (fig, "nextplot"), "add") | 52 retval = (strcmpi (get (fig, "nextplot"), "add") |
53 && strcmpi (get (ax, "nextplot"), "add")); | 53 && strcmpi (get (ax, "nextplot"), "add")); |
54 | 54 |
55 endfunction | 55 endfunction |