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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
7 ##
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
8 ## This file is part of Octave.
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
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
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
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
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
14 ##
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
15 ## Octave is distributed in the hope that it will be useful, but
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
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
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
19 ##
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
20 ## You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6895
diff changeset
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
91edf12ce30b [project @ 1994-11-21 22:08:36 by jwe]
jwe
parents:
diff changeset
25
3426
f8dde1807dee [project @ 2000-01-13 08:40:00 by jwe]
jwe
parents: 3408
diff changeset
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
f8dde1807dee [project @ 2000-01-13 08:40:00 by jwe]
jwe
parents: 3408
diff changeset
36 ## @end deftypefn
946
91edf12ce30b [project @ 1994-11-21 22:08:36 by jwe]
jwe
parents:
diff changeset
37
2311
2b5788792cad [project @ 1996-07-11 20:18:38 by jwe]
jwe
parents: 2303
diff changeset
38 function shg ()
946
91edf12ce30b [project @ 1994-11-21 22:08:36 by jwe]
jwe
parents:
diff changeset
39
91edf12ce30b [project @ 1994-11-21 22:08:36 by jwe]
jwe
parents:
diff changeset
40 if (nargin != 0)
91edf12ce30b [project @ 1994-11-21 22:08:36 by jwe]
jwe
parents:
diff changeset
41 warning ("shg: ignoring extra arguments");
91edf12ce30b [project @ 1994-11-21 22:08:36 by jwe]
jwe
parents:
diff changeset
42 endif
91edf12ce30b [project @ 1994-11-21 22:08:36 by jwe]
jwe
parents:
diff changeset
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
91edf12ce30b [project @ 1994-11-21 22:08:36 by jwe]
jwe
parents:
diff changeset
49
91edf12ce30b [project @ 1994-11-21 22:08:36 by jwe]
jwe
parents:
diff changeset
50 endfunction