Mercurial > hg > octave-lyh
annotate scripts/plot/findall.m @ 17130:26589abbc78d
Don't pass axis handle unnecessarily from high level to low level plot functions.
* scripts/plot/comet.m, scripts/plot/comet3.m, scripts/plot/compass.m,
scripts/plot/contour.m, scripts/plot/contourf.m, scripts/plot/cylinder.m,
scripts/plot/ellipsoid.m, scripts/plot/errorbar.m, scripts/plot/feather.m,
scripts/plot/mesh.m, scripts/plot/meshc.m, scripts/plot/meshz.m,
scripts/plot/pcolor.m, scripts/plot/plot3.m, scripts/plot/rectangle.m,
scripts/plot/rose.m, scripts/plot/scatter3.m, scripts/plot/semilogxerr.m,
scripts/plot/semilogy.m, scripts/plot/semilogyerr.m, scripts/plot/slice.m,
scripts/plot/sphere.m, scripts/plot/stairs.m, scripts/plot/surf.m,
scripts/plot/surfc.m, scripts/plot/surfnorm.m, scripts/plot/trimesh.m,
scripts/plot/trisurf.m: Don't pass hax to lower level functions after
newplot() has been called.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 31 Jul 2013 18:42:17 -0700 |
parents | eaab03308c0b |
children | 3fd617363762 |
rev | line source |
---|---|
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
14001
diff
changeset
|
1 ## Copyright (C) 2008-2012 Bill Denney |
7557 | 2 ## |
3 ## This file is part of Octave. | |
4 ## | |
5 ## Octave is free software; you can redistribute it and/or modify it | |
6 ## under the terms of the GNU General Public License as published by | |
7 ## the Free Software Foundation; either version 3 of the License, or (at | |
8 ## your option) any later version. | |
9 ## | |
10 ## Octave is distributed in the hope that it will be useful, but | |
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 ## General Public License for more details. | |
14 ## | |
15 ## You should have received a copy of the GNU General Public License | |
16 ## along with Octave; see the file COPYING. If not, see | |
17 ## <http://www.gnu.org/licenses/>. | |
18 | |
19 ## -*- texinfo -*- | |
10793
be55736a0783
Grammarcheck the documentation from m-files.
Rik <octave@nomad.inbox5.com>
parents:
8920
diff
changeset
|
20 ## @deftypefn {Function File} {@var{h} =} findall () |
17126
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17123
diff
changeset
|
21 ## @deftypefnx {Function File} {@var{h} =} findall (@var{prop_name}, @var{prop_value}, @dots{}) |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17123
diff
changeset
|
22 ## @deftypefnx {Function File} {@var{h} =} findall (@var{prop_name}, @var{prop_value}, "-@var{logical_op}", @var{prop_name}, @var{prop_value}) |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17123
diff
changeset
|
23 ## @deftypefnx {Function File} {@var{h} =} findall ("-property", @var{prop_name}) |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17123
diff
changeset
|
24 ## @deftypefnx {Function File} {@var{h} =} findall ("-regexp", @var{prop_name}, @var{pattern}) |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17123
diff
changeset
|
25 ## @deftypefnx {Function File} {@var{h} =} findall (@var{hlist}, @dots{}) |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17123
diff
changeset
|
26 ## @deftypefnx {Function File} {@var{h} =} findall (@var{hlist}, "flat", @dots{}) |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17123
diff
changeset
|
27 ## @deftypefnx {Function File} {@var{h} =} findall (@var{hlist}, "-depth", @var{d}, @dots{}) |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17123
diff
changeset
|
28 ## Find graphics object, including hidden ones, with specified property values. |
7557 | 29 ## |
17126
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17123
diff
changeset
|
30 ## The return value @var{h} is a list of handles to the found graphic objects. |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17123
diff
changeset
|
31 ## |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17123
diff
changeset
|
32 ## @code{findall} performs the same search as @code{findobj}, but it |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17123
diff
changeset
|
33 ## includes hidden objects ("HandleVisibility" = "off"). For full |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17123
diff
changeset
|
34 ## documentation, @pxref{XREFfindobj,,findobj}. |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17123
diff
changeset
|
35 ## @seealso{findobj, allchild, get, set} |
7557 | 36 ## @end deftypefn |
37 | |
38 ## Author: Bill Denney <bill@denney.ws> | |
39 | |
40 function h = findall (varargin) | |
41 | |
42 unwind_protect | |
43 shh = get (0, "showhiddenhandles"); | |
44 set (0, "showhiddenhandles", "on"); | |
45 h = findobj (varargin{:}); | |
46 unwind_protect_cleanup | |
47 set (0, "showhiddenhandles", shh); | |
48 end_unwind_protect | |
49 | |
50 endfunction | |
13096 | 51 |
13977
08ae07e40d4f
Only run uimenu tests if FLTK toolkit is available (Bug #34908)
Rik <octave@nomad.inbox5.com>
parents:
13141
diff
changeset
|
52 |
08ae07e40d4f
Only run uimenu tests if FLTK toolkit is available (Bug #34908)
Rik <octave@nomad.inbox5.com>
parents:
13141
diff
changeset
|
53 %!testif HAVE_FLTK |
17111
dbd64c9a16da
Restore graphics toolkit after %!tests that alter it.
Rik <rik@octave.org>
parents:
14138
diff
changeset
|
54 %! toolkit = graphics_toolkit ("fltk"); |
17123
bd50e0660545
test: Add missing semicolons to suppress output in some plot %!tests.
Rik <rik@octave.org>
parents:
17111
diff
changeset
|
55 %! hf = figure ("visible", "off"); |
13141
e81ddf9cacd5
maint: untabify and remove trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
13124
diff
changeset
|
56 %! unwind_protect |
13111
ebb42fb2da04
Various fixes for tests in scripts/plot
Kai Habel <kai.habel@gmx.de>
parents:
13096
diff
changeset
|
57 %! h = findall (hf); |
13977
08ae07e40d4f
Only run uimenu tests if FLTK toolkit is available (Bug #34908)
Rik <octave@nomad.inbox5.com>
parents:
13141
diff
changeset
|
58 %! all_handles(1:13,1) = {"uimenu"}; |
08ae07e40d4f
Only run uimenu tests if FLTK toolkit is available (Bug #34908)
Rik <octave@nomad.inbox5.com>
parents:
13141
diff
changeset
|
59 %! all_handles(14) = {"figure"}; |
08ae07e40d4f
Only run uimenu tests if FLTK toolkit is available (Bug #34908)
Rik <octave@nomad.inbox5.com>
parents:
13141
diff
changeset
|
60 %! assert (get (h, "type"), all_handles); |
13096 | 61 %! unwind_protect_cleanup |
62 %! close (hf); | |
13977
08ae07e40d4f
Only run uimenu tests if FLTK toolkit is available (Bug #34908)
Rik <octave@nomad.inbox5.com>
parents:
13141
diff
changeset
|
63 %! graphics_toolkit (toolkit); |
13096 | 64 %! end_unwind_protect |
13977
08ae07e40d4f
Only run uimenu tests if FLTK toolkit is available (Bug #34908)
Rik <octave@nomad.inbox5.com>
parents:
13141
diff
changeset
|
65 |