1014
|
1 # Copyright (C) 1993, 1994, 1995 John W. Eaton |
245
|
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 the |
|
7 # Free Software Foundation; either version 2, or (at your option) any |
|
8 # later version. |
|
9 # |
|
10 # Octave is distributed in the hope that it will be useful, but WITHOUT |
|
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
13 # 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 |
1315
|
17 # Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
245
|
18 |
934
|
19 function plot (...) |
4
|
20 |
|
21 # usage: plot (x, y) |
934
|
22 # plot (x1, y1, x2, y2, ...) |
|
23 # plot (x, y, fmt) |
4
|
24 # |
|
25 # If the first argument is a vector and the second is a matrix, the |
|
26 # the vector is plotted versus the columns (or rows) of the matrix. |
|
27 # (using whichever combination matches, with columns tried first.) |
|
28 # |
|
29 # If the first argument is a matrix and the second is a vector, the |
|
30 # the columns (or rows) of the matrix are plotted versus the vector. |
|
31 # (using whichever combination matches, with columns tried first.) |
|
32 # |
|
33 # If both arguments are vectors, the elements of y are plotted versus |
|
34 # the elements of x. |
|
35 # |
|
36 # If both arguments are matrices, the columns of y are plotted versus |
|
37 # the columns of x. In this case, both matrices must have the same |
|
38 # number of rows and columns and no attempt is made to transpose the |
|
39 # arguments to make the number of rows match. |
|
40 # |
|
41 # If both arguments are scalars, a single point is plotted. |
|
42 # |
|
43 # If only one argument is given, it is taken as the set of y |
|
44 # coordinates and the x coordinates are taken to be the indices of the |
|
45 # elements, starting with 1. |
|
46 # |
934
|
47 # To see possible options for FMT please see plot_opt. |
|
48 # |
|
49 # Examples: |
|
50 # |
|
51 # plot (x, y, "@12", x, y2, x, y3, "4", x, y4, "+") |
|
52 # |
|
53 # y will be plotted with points of type 2 ("+") and color 1 (red). |
|
54 # y2 will be plotted with lines. |
|
55 # y3 will be plotted with lines of color 4. |
|
56 # y4 will be plotted with points which are "+"s. |
|
57 # |
|
58 # plot (b, "*") |
|
59 # |
|
60 # b will be plotted with points of type "*". |
|
61 # |
|
62 # See also: semilogx, semilogy, loglog, polar, mesh, contour, plot_opt |
4
|
63 # bar, stairs, gplot, gsplot, replot, xlabel, ylabel, title |
|
64 |
|
65 set nologscale; |
|
66 set nopolar; |
|
67 |
934
|
68 plot_int ("plot", all_va_args); |
4
|
69 |
|
70 endfunction |