Mercurial > octave
comparison scripts/plot/grid.m @ 4:b4df021f796c
[project @ 1993-08-08 01:26:08 by jwe]
Initial revision
author | jwe |
---|---|
date | Sun, 08 Aug 1993 01:26:08 +0000 |
parents | |
children | 16a24e76d6e0 |
comparison
equal
deleted
inserted
replaced
3:9a4c07481e61 | 4:b4df021f796c |
---|---|
1 function grid (x) | |
2 | |
3 # usage: grid ("on" | "off") | |
4 # | |
5 # Turn grid lines on or off for plotting. | |
6 # | |
7 # If the argument is omitted, "on" is assumed. | |
8 # | |
9 # See also: plot, semilogx, semilogy, loglog, polar, mesh, contour, | |
10 # bar, stairs, gplot, gsplot, replot, xlabel, ylabel, title | |
11 | |
12 if (nargin == 0) | |
13 set grid; | |
14 elseif (nargin == 1) | |
15 if (isstr (x)) | |
16 if (strcmp ("off", x)) | |
17 set nogrid; | |
18 elseif (strcmp ("on", x)) | |
19 set grid; | |
20 else | |
21 error ("usage: grid (\"on\" | \"off\")"); | |
22 endif | |
23 else | |
24 error ("error: grid: argument must be a string"); | |
25 endif | |
26 else | |
27 error ("usage: grid (\"on\" | \"off\")"); | |
28 endif | |
29 | |
30 endfunction |