Mercurial > hg > octave-nkf
comparison scripts/plot/plotyy.m @ 11149:fe3c3dfc07eb
style fix: break lines before && and ||, not after
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 23 Oct 2010 03:00:31 -0400 |
parents | c9786e03670c |
children | a3cb42b394eb |
comparison
equal
deleted
inserted
replaced
11148:c9ec943ebe65 | 11149:fe3c3dfc07eb |
---|---|
55 | 55 |
56 function [Ax, H1, H2] = plotyy (varargin) | 56 function [Ax, H1, H2] = plotyy (varargin) |
57 | 57 |
58 ## Don't use __plt_get_axis_arg__ here as ax is a two vector for plotyy | 58 ## Don't use __plt_get_axis_arg__ here as ax is a two vector for plotyy |
59 if (nargin > 1 && length (varargin{1}) == 2 && ishandle(varargin{1}(1)) | 59 if (nargin > 1 && length (varargin{1}) == 2 && ishandle(varargin{1}(1)) |
60 && ishandle(varargin{1}(2)) && | 60 && ishandle(varargin{1}(2)) |
61 all (floor (varargin{1}) != varargin{1})) | 61 && all (floor (varargin{1}) != varargin{1})) |
62 obj1 = get (varargin{1}(1)); | 62 obj1 = get (varargin{1}(1)); |
63 obj2 = get (varargin{1}(2)); | 63 obj2 = get (varargin{1}(2)); |
64 if (strcmp (obj1.type, "axes") || strcmp (obj2.type, "axes")) | 64 if (strcmp (obj1.type, "axes") || strcmp (obj2.type, "axes")) |
65 ax = [obj1, obj2]; | 65 ax = [obj1, obj2]; |
66 varargin(1) = []; | 66 varargin(1) = []; |
235 %! subplot (2, 2, 4) | 235 %! subplot (2, 2, 4) |
236 %! plotyy (x, 10*sin(2*pi*x), x, cos(2*pi*x)) | 236 %! plotyy (x, 10*sin(2*pi*x), x, cos(2*pi*x)) |
237 %! axis square | 237 %! axis square |
238 | 238 |
239 function deleteplotyy (h, d, ax2, t2) | 239 function deleteplotyy (h, d, ax2, t2) |
240 if (ishandle (ax2) && strcmp (get (ax2, "type"), "axes") && | 240 if (ishandle (ax2) && strcmp (get (ax2, "type"), "axes") |
241 (isempty (gcbf()) || strcmp (get (gcbf(), "beingdeleted"),"off")) && | 241 && (isempty (gcbf()) || strcmp (get (gcbf(), "beingdeleted"),"off")) |
242 strcmp (get (ax2, "beingdeleted"), "off")) | 242 && strcmp (get (ax2, "beingdeleted"), "off")) |
243 set (t2, "deletefcn", []); | 243 set (t2, "deletefcn", []); |
244 delete (ax2); | 244 delete (ax2); |
245 endif | 245 endif |
246 endfunction | 246 endfunction |
247 | 247 |