2313
|
1 ## Copyright (C) 1996 John W. Eaton |
|
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 2, or (at your option) |
|
8 ## 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, write to the Free |
|
17 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA |
|
18 ## 02111-1307, USA. |
245
|
19 |
2311
|
20 ## usage: plot (x, y) |
|
21 ## plot (x1, y1, x2, y2, ...) |
|
22 ## plot (x, y, fmt) |
|
23 ## |
|
24 ## If the first argument is a vector and the second is a matrix, the |
|
25 ## the vector is plotted versus the columns (or rows) of the matrix. |
|
26 ## (using whichever combination matches, with columns tried first.) |
|
27 ## |
|
28 ## If the first argument is a matrix and the second is a vector, the |
|
29 ## the columns (or rows) of the matrix are plotted versus the vector. |
|
30 ## (using whichever combination matches, with columns tried first.) |
|
31 ## |
|
32 ## If both arguments are vectors, the elements of y are plotted versus |
|
33 ## the elements of x. |
|
34 ## |
|
35 ## If both arguments are matrices, the columns of y are plotted versus |
|
36 ## the columns of x. In this case, both matrices must have the same |
|
37 ## number of rows and columns and no attempt is made to transpose the |
|
38 ## arguments to make the number of rows match. |
|
39 ## |
|
40 ## If both arguments are scalars, a single point is plotted. |
|
41 ## |
|
42 ## If only one argument is given, it is taken as the set of y |
|
43 ## coordinates and the x coordinates are taken to be the indices of the |
|
44 ## elements, starting with 1. |
|
45 ## |
2315
|
46 ## To see possible options for FMT please see __pltopt__. |
2311
|
47 ## |
|
48 ## Examples: |
|
49 ## |
|
50 ## plot (x, y, "@12", x, y2, x, y3, "4", x, y4, "+") |
|
51 ## |
|
52 ## y will be plotted with points of type 2 ("+") and color 1 (red). |
|
53 ## y2 will be plotted with lines. |
|
54 ## y3 will be plotted with lines of color 4. |
|
55 ## y4 will be plotted with points which are "+"s. |
|
56 ## |
|
57 ## plot (b, "*") |
|
58 ## |
|
59 ## b will be plotted with points of type "*". |
|
60 ## |
2315
|
61 ## See also: semilogx, semilogy, loglog, polar, mesh, contour, __pltopt__ |
2325
|
62 ## bar, stairs, gplot, gsplot, replot, xlabel, ylabel, title |
4
|
63 |
2314
|
64 ## Author: jwe |
|
65 |
2311
|
66 function plot (...) |
4
|
67 |
|
68 set nologscale; |
|
69 set nopolar; |
|
70 |
2315
|
71 __plt__ ("plot", all_va_args); |
4
|
72 |
|
73 endfunction |