annotate scripts/plot/grid.m @ 17049:0322e057697f

hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__. * scripts/plot/box.m: Update to use new __plt_get_axis_arg__. Use hax instead of ax. Redo docstring. * scripts/plot/grid.m: Update to use new __plt_get_axis_arg__. Use hax instead of ax. Redo docstring. Move input validation to front of function. * scripts/plot/hold.m: Update to use new __plt_get_axis_arg__. Use hax instead of ax. Redo docstring. Add 2 new %!demos.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Tue, 23 Jul 2013 15:10:57 +0200
parents 4506eade9f04
children d3ebc3f9bdbf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14138
72c96de7a403 maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
1 ## Copyright (C) 1993-2012 John W. Eaton
2313
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
2 ##
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
3 ## This file is part of Octave.
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
4 ##
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
6 ## under the terms of the GNU General Public License as published by
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6895
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6895
diff changeset
8 ## your option) any later version.
2313
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
9 ##
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
10 ## 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
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2311
diff changeset
13 ## General Public License for more details.
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 ## 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
16 ## along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6895
diff changeset
17 ## <http://www.gnu.org/licenses/>.
245
16a24e76d6e0 [project @ 1993-12-03 02:00:15 by jwe]
jwe
parents: 4
diff changeset
18
3368
a4cd1e9d9962 [project @ 1999-11-20 17:22:48 by jwe]
jwe
parents: 2847
diff changeset
19 ## -*- texinfo -*-
17049
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
20 ## @deftypefn {Function File} {} grid
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
21 ## @deftypefnx {Function File} {} grid on
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
22 ## @deftypefnx {Function File} {} grid off
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
23 ## @deftypefnx {Function File} {} grid minor
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
24 ## @deftypefnx {Function File} {} grid minor on
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
25 ## @deftypefnx {Function File} {} grid minor off
8528
06e1667d7492 grid.m: Correct doc-string.
Ben Abbott <bpabbott@mac.com>
parents: 8507
diff changeset
26 ## @deftypefnx {Function File} {} grid (@var{hax}, @dots{})
17049
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
27 ## Control the display of grid lines on a plot.
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
28 ##
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
29 ## The function input may be either @code{"on"}, or @code{"off"}.
8528
06e1667d7492 grid.m: Correct doc-string.
Ben Abbott <bpabbott@mac.com>
parents: 8507
diff changeset
30 ## If it is omitted, the current grid state is toggled.
5727
f0fbefd984f6 [project @ 2006-04-03 18:50:31 by jwe]
jwe
parents: 5642
diff changeset
31 ##
17049
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
32 ## If the first argument is @code{"minor"} then all further commands
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
33 ## modify the minor grid rather than the major grid.
8528
06e1667d7492 grid.m: Correct doc-string.
Ben Abbott <bpabbott@mac.com>
parents: 8507
diff changeset
34 ##
06e1667d7492 grid.m: Correct doc-string.
Ben Abbott <bpabbott@mac.com>
parents: 8507
diff changeset
35 ## If the first argument is an axis handle, @var{hax}, operate on the
06e1667d7492 grid.m: Correct doc-string.
Ben Abbott <bpabbott@mac.com>
parents: 8507
diff changeset
36 ## specified axis object.
17049
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
37 ##
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
38 ## To control the grid lines for an individual axis use the @code{set}
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
39 ## function. For example,
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
40 ##
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
41 ## @example
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
42 ## set (gca, "ygrid", "on");
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
43 ## @end example
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
44 ## @seealso{box}
3368
a4cd1e9d9962 [project @ 1999-11-20 17:22:48 by jwe]
jwe
parents: 2847
diff changeset
45 ## @end deftypefn
4
b4df021f796c [project @ 1993-08-08 01:26:08 by jwe]
jwe
parents:
diff changeset
46
2314
949ab8eba8bc [project @ 1996-07-12 03:58:02 by jwe]
jwe
parents: 2313
diff changeset
47 ## Author: jwe
949ab8eba8bc [project @ 1996-07-12 03:58:02 by jwe]
jwe
parents: 2313
diff changeset
48
7215
dd88d61d443f [project @ 2007-11-29 16:44:45 by jwe]
jwe
parents: 7017
diff changeset
49 function grid (varargin)
5727
f0fbefd984f6 [project @ 2006-04-03 18:50:31 by jwe]
jwe
parents: 5642
diff changeset
50
17049
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
51 [hax, varargin, nargs] = __plt_get_axis_arg__ ("grid", varargin{:});
6257
44c91c5dfe1d [project @ 2007-01-30 19:16:52 by jwe]
jwe
parents: 6046
diff changeset
52
17049
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
53 if (isempty (hax))
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
54 hax = gca ();
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
55 endif
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
56
8424
a84d71abdc5b grid.m: handle minor grid option
Doug Stewart <dastew@sympatico.ca>
parents: 8190
diff changeset
57 if (nargs > 2)
7215
dd88d61d443f [project @ 2007-11-29 16:44:45 by jwe]
jwe
parents: 7017
diff changeset
58 print_usage ();
17049
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
59 endif
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
60
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
61 grid_on = ( strcmp (get (hax, "xgrid"), "on")
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
62 && strcmp (get (hax, "ygrid"), "on")
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
63 && strcmp (get (hax, "zgrid"), "on"));
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
64
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
65 minor_on = ( strcmp (get (hax, "xminorgrid"), "on")
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
66 && strcmp (get (hax, "yminorgrid"), "on")
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
67 && strcmp (get (hax, "zminorgrid"), "on"));
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
68
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
69 if (nargs == 0)
7215
dd88d61d443f [project @ 2007-11-29 16:44:45 by jwe]
jwe
parents: 7017
diff changeset
70 grid_on = ! grid_on;
6257
44c91c5dfe1d [project @ 2007-01-30 19:16:52 by jwe]
jwe
parents: 6046
diff changeset
71 else
7215
dd88d61d443f [project @ 2007-11-29 16:44:45 by jwe]
jwe
parents: 7017
diff changeset
72 x = varargin{1};
17049
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
73 if (! ischar (x))
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
74 error ("grid: argument must be a string");
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
75 endif
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
76 if (strcmpi (x, "off"))
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
77 grid_on = false;
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
78 elseif (strcmpi (x, "on"))
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
79 grid_on = true;
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
80 elseif (strcmpi (x, "minor"))
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
81 if (nargs == 2)
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
82 x2 = varargin{2};
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
83 if (strcmpi (x2, "on"))
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
84 minor_on = true;
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
85 grid_on = true;
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
86 elseif (strcmpi (x2, "off"))
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
87 minor_on = false;
10549
95c3e38098bf Untabify .m scripts
Rik <code@nomad.inbox5.com>
parents: 9374
diff changeset
88 else
17049
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
89 print_usage ();
10549
95c3e38098bf Untabify .m scripts
Rik <code@nomad.inbox5.com>
parents: 9374
diff changeset
90 endif
4
b4df021f796c [project @ 1993-08-08 01:26:08 by jwe]
jwe
parents:
diff changeset
91 else
17049
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
92 minor_on = ! minor_on;
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
93 if (minor_on)
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
94 grid_on = true;
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
95 endif
4
b4df021f796c [project @ 1993-08-08 01:26:08 by jwe]
jwe
parents:
diff changeset
96 endif
b4df021f796c [project @ 1993-08-08 01:26:08 by jwe]
jwe
parents:
diff changeset
97 else
17049
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
98 print_usage ();
4
b4df021f796c [project @ 1993-08-08 01:26:08 by jwe]
jwe
parents:
diff changeset
99 endif
6257
44c91c5dfe1d [project @ 2007-01-30 19:16:52 by jwe]
jwe
parents: 6046
diff changeset
100 endif
44c91c5dfe1d [project @ 2007-01-30 19:16:52 by jwe]
jwe
parents: 6046
diff changeset
101
44c91c5dfe1d [project @ 2007-01-30 19:16:52 by jwe]
jwe
parents: 6046
diff changeset
102 if (grid_on)
17049
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
103 set (hax, "xgrid", "on", "ygrid", "on", "zgrid", "on");
6257
44c91c5dfe1d [project @ 2007-01-30 19:16:52 by jwe]
jwe
parents: 6046
diff changeset
104 if (minor_on)
17049
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
105 set (hax, "xminorgrid", "on", "yminorgrid", "on", "zminorgrid", "on");
5727
f0fbefd984f6 [project @ 2006-04-03 18:50:31 by jwe]
jwe
parents: 5642
diff changeset
106 else
17049
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
107 set (hax, "xminorgrid", "off", "yminorgrid", "off", "zminorgrid", "off");
6257
44c91c5dfe1d [project @ 2007-01-30 19:16:52 by jwe]
jwe
parents: 6046
diff changeset
108 endif
4
b4df021f796c [project @ 1993-08-08 01:26:08 by jwe]
jwe
parents:
diff changeset
109 else
17049
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
110 set (hax, "xgrid", "off", "ygrid", "off", "zgrid", "off",
0322e057697f hold.m, grid.m, box.m: Update to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 14245
diff changeset
111 "xminorgrid", "off", "yminorgrid", "off", "zminorgrid", "off");
5152
b111ca4715c6 [project @ 2005-02-21 19:41:23 by jwe]
jwe
parents: 5053
diff changeset
112 endif
b111ca4715c6 [project @ 2005-02-21 19:41:23 by jwe]
jwe
parents: 5053
diff changeset
113
4
b4df021f796c [project @ 1993-08-08 01:26:08 by jwe]
jwe
parents:
diff changeset
114 endfunction
9374
6a035159ba0e grid.m: Add missing semi-colon. Fix grid toggle. Allow minor grid when no minor tick.
Ben Abbott <bpabbott@mac.com>
parents: 8920
diff changeset
115
14237
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
116
9374
6a035159ba0e grid.m: Add missing semi-colon. Fix grid toggle. Allow minor grid when no minor tick.
Ben Abbott <bpabbott@mac.com>
parents: 8920
diff changeset
117 %!demo
14237
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
118 %! clf;
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
119 %! subplot (2,2,1);
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
120 %! plot (1:100);
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
121 %! grid off;
14245
4506eade9f04 Use Matlab coding conventions for demos in plot/ directory.
Rik <octave@nomad.inbox5.com>
parents: 14237
diff changeset
122 %! title ('no grid');
14237
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
123 %! subplot (2,2,2);
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
124 %! plot (1:100);
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
125 %! grid on;
14245
4506eade9f04 Use Matlab coding conventions for demos in plot/ directory.
Rik <octave@nomad.inbox5.com>
parents: 14237
diff changeset
126 %! title ('grid on');
14237
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
127 %! subplot (2,2,3);
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
128 %! plot (1:100);
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
129 %! grid minor;
14245
4506eade9f04 Use Matlab coding conventions for demos in plot/ directory.
Rik <octave@nomad.inbox5.com>
parents: 14237
diff changeset
130 %! title ('grid minor');
14237
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
131 %! subplot (2,2,4);
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
132 %! semilogy (1:100);
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
133 %! grid minor;
14245
4506eade9f04 Use Matlab coding conventions for demos in plot/ directory.
Rik <octave@nomad.inbox5.com>
parents: 14237
diff changeset
134 %! title ('grid minor');
9374
6a035159ba0e grid.m: Add missing semi-colon. Fix grid toggle. Allow minor grid when no minor tick.
Ben Abbott <bpabbott@mac.com>
parents: 8920
diff changeset
135