Mercurial > octave
annotate scripts/plot/util/shg.m @ 31706:597f3ee61a48 stable
update Octave Project Developers copyright for the new year
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 06 Jan 2023 13:11:27 -0500 |
parents | 796f54d4ddbf |
children | 2e484f9f1f18 |
rev | line source |
---|---|
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
1 ######################################################################## |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
2 ## |
31706
597f3ee61a48
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
3 ## Copyright (C) 1994-2023 The Octave Project Developers |
27918
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
27898
diff
changeset
|
4 ## |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
5 ## See the file COPYRIGHT.md in the top-level directory of this |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
6 ## distribution or <https://octave.org/copyright/>. |
2313 | 7 ## |
8 ## This file is part of Octave. | |
9 ## | |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
10 ## Octave is free software: you can redistribute it and/or modify it |
2313 | 11 ## under the terms of the GNU General Public License as published by |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
12 ## the Free Software Foundation, either version 3 of the License, or |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
13 ## (at your option) any later version. |
2313 | 14 ## |
15 ## Octave is distributed in the hope that it will be useful, but | |
16 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
17 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
18 ## GNU General Public License for more details. |
2313 | 19 ## |
20 ## You should have received a copy of the GNU General Public License | |
7016 | 21 ## along with Octave; see the file COPYING. If not, see |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
22 ## <https://www.gnu.org/licenses/>. |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
23 ## |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
24 ######################################################################## |
946 | 25 |
3426 | 26 ## -*- texinfo -*- |
20852
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
27 ## @deftypefn {} {} shg |
17122
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
14138
diff
changeset
|
28 ## Show the graph window. |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
14138
diff
changeset
|
29 ## |
25802
b785394f10d0
shg.m: Don't create a figure if none exists.
Rik <rik@octave.org>
parents:
25799
diff
changeset
|
30 ## This function makes the current figure visible, and places it on top of |
b785394f10d0
shg.m: Don't create a figure if none exists.
Rik <rik@octave.org>
parents:
25799
diff
changeset
|
31 ## of all other plot windows. |
b785394f10d0
shg.m: Don't create a figure if none exists.
Rik <rik@octave.org>
parents:
25799
diff
changeset
|
32 ## |
b785394f10d0
shg.m: Don't create a figure if none exists.
Rik <rik@octave.org>
parents:
25799
diff
changeset
|
33 ## Programming Note: @code{shg} is equivalent to @code{figure (gcf)} assuming |
b785394f10d0
shg.m: Don't create a figure if none exists.
Rik <rik@octave.org>
parents:
25799
diff
changeset
|
34 ## that a current figure exists. |
b785394f10d0
shg.m: Don't create a figure if none exists.
Rik <rik@octave.org>
parents:
25799
diff
changeset
|
35 ## @seealso{figure, drawnow, gcf} |
3426 | 36 ## @end deftypefn |
946 | 37 |
2311 | 38 function shg () |
946 | 39 |
40 if (nargin != 0) | |
41 warning ("shg: ignoring extra arguments"); | |
42 endif | |
43 | |
25802
b785394f10d0
shg.m: Don't create a figure if none exists.
Rik <rik@octave.org>
parents:
25799
diff
changeset
|
44 hf = get (0, "currentfigure"); |
b785394f10d0
shg.m: Don't create a figure if none exists.
Rik <rik@octave.org>
parents:
25799
diff
changeset
|
45 if (! isempty (hf)) |
b785394f10d0
shg.m: Don't create a figure if none exists.
Rik <rik@octave.org>
parents:
25799
diff
changeset
|
46 set (hf, "visible", "on"); |
26598
988118822a92
shg: fix syntax error introduced in cset b785394f10d0
Mike Miller <mtmiller@octave.org>
parents:
26376
diff
changeset
|
47 __show_figure__ (hf); |
25802
b785394f10d0
shg.m: Don't create a figure if none exists.
Rik <rik@octave.org>
parents:
25799
diff
changeset
|
48 endif |
946 | 49 |
50 endfunction |