comparison scripts/plot/axes.m @ 17129: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 1c89599167a6
comparison
equal deleted inserted replaced
17128:7649779e6ebd 17129:b5d6314314fc
55 set (ancestor (cf, "figure"), "currentaxes", htmp); 55 set (ancestor (cf, "figure"), "currentaxes", htmp);
56 endif 56 endif
57 else 57 else
58 ## ARG is axes handle. 58 ## ARG is axes handle.
59 htmp = varargin{1}; 59 htmp = varargin{1};
60 if (isscalar (htmp) && ishandle (htmp) 60 if (isscalar (htmp) && isaxes (htmp))
61 && strcmp (get (htmp, "type"), "axes"))
62 if (__is_handle_visible__ (htmp)) 61 if (__is_handle_visible__ (htmp))
63 parent = ancestor (htmp, "figure"); 62 parent = ancestor (htmp, "figure");
64 set (0, "currentfigure", parent); 63 set (0, "currentfigure", parent);
65 set (parent, "currentaxes", htmp); 64 set (parent, "currentaxes", htmp);
66 65