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