comparison scripts/plot/plot.m @ 3368:a4cd1e9d9962

[project @ 1999-11-20 17:22:48 by jwe]
author jwe
date Sat, 20 Nov 1999 17:23:01 +0000
parents 4287b8c06fbf
children 5e0a0b1cba43
comparison
equal deleted inserted replaced
3367:0748b03c3510 3368:a4cd1e9d9962
15 ## You should have received a copy of the GNU General Public License 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 16 ## along with Octave; see the file COPYING. If not, write to the Free
17 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 17 ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA
18 ## 02111-1307, USA. 18 ## 02111-1307, USA.
19 19
20 ## usage: plot (x, y) 20 ## -*- texinfo -*-
21 ## plot (x1, y1, x2, y2, ...) 21 ## @deftypefn {Function File} {} plot (@var{args})
22 ## plot (x, y, fmt) 22 ## This function produces two-dimensional plots. Many different
23 ## 23 ## combinations of arguments are possible. The simplest form is
24 ##
25 ## @example
26 ## plot (@var{y})
27 ## @end example
28 ##
29 ## @noindent
30 ## where the argument is taken as the set of @var{y} coordinates and the
31 ## @var{x} coordinates are taken to be the indices of the elements,
32 ## starting with 1.
33 ##
34 ## If more than one argument is given, they are interpreted as
35 ##
36 ## @example
37 ## plot (@var{x}, @var{y}, @var{fmt} ...)
38 ## @end example
39 ##
40 ## @noindent
41 ## where @var{y} and @var{fmt} are optional, and any number of argument
42 ## sets may appear. The @var{x} and @var{y} values are
43 ## interpreted as follows:
44 ##
45 ## @itemize @bullet
46 ## @item
47 ## If a single data argument is supplied, it is taken as the set of @var{y}
48 ## coordinates and the @var{x} coordinates are taken to be the indices of
49 ## the elements, starting with 1.
50 ##
51 ## @item
24 ## If the first argument is a vector and the second is a matrix, the 52 ## 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. 53 ## the vector is plotted versus the columns (or rows) of the matrix.
26 ## (using whichever combination matches, with columns tried first.) 54 ## (using whichever combination matches, with columns tried first.)
27 ## 55 ##
56 ## @item
28 ## If the first argument is a matrix and the second is a vector, the 57 ## 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. 58 ## the columns (or rows) of the matrix are plotted versus the vector.
30 ## (using whichever combination matches, with columns tried first.) 59 ## (using whichever combination matches, with columns tried first.)
31 ## 60 ##
32 ## If both arguments are vectors, the elements of y are plotted versus 61 ## @item
33 ## the elements of x. 62 ## If both arguments are vectors, the elements of @var{y} are plotted versus
34 ## 63 ## the elements of @var{x}.
35 ## If both arguments are matrices, the columns of y are plotted versus 64 ##
36 ## the columns of x. In this case, both matrices must have the same 65 ## @item
37 ## number of rows and columns and no attempt is made to transpose the 66 ## If both arguments are matrices, the columns of @var{y} are plotted
38 ## arguments to make the number of rows match. 67 ## versus the columns of @var{x}. In this case, both matrices must have
39 ## 68 ## the same number of rows and columns and no attempt is made to transpose
69 ## the arguments to make the number of rows match.
70 ##
40 ## If both arguments are scalars, a single point is plotted. 71 ## If both arguments are scalars, a single point is plotted.
41 ## 72 ## @end itemize
42 ## If only one argument is given, it is taken as the set of y 73 ##
43 ## coordinates and the x coordinates are taken to be the indices of the 74 ## If the @var{fmt} argument is supplied, it is interpreted as
44 ## elements, starting with 1. 75 ## follows. If @var{fmt} is missing, the default gnuplot line style
45 ## 76 ## is assumed.
46 ## To see possible options for FMT please see __pltopt__. 77 ##
47 ## 78 ## @table @samp
48 ## Examples: 79 ## @item -
49 ## 80 ## Set lines plot style (default).
50 ## plot (x, y, "@12", x, y2, x, y3, "4", x, y4, "+") 81 ##
51 ## 82 ## @item .
52 ## y will be plotted with points of type 2 ("+") and color 1 (red). 83 ## Set dots plot style.
53 ## y2 will be plotted with lines. 84 ##
54 ## y3 will be plotted with lines of color 4. 85 ## @item @@
55 ## y4 will be plotted with points which are "+"s. 86 ## Set points plot style.
56 ## 87 ##
57 ## plot (b, "*") 88 ## @item -@@
58 ## 89 ## Set linespoints plot style.
59 ## b will be plotted with points of type "*". 90 ##
60 ## 91 ## @item ^
92 ## Set impulses plot style.
93 ##
94 ## @item L
95 ## Set steps plot style.
96 ##
97 ## @item #
98 ## Set boxes plot style.
99 ##
100 ## @item ~
101 ## Set errorbars plot style.
102 ##
103 ## @item #~
104 ## Set boxerrorbars plot style.
105 ##
106 ## @item @var{n}
107 ## Interpreted as the plot color if @var{n} is an integer in the range 1 to
108 ## 6.
109 ##
110 ## @item @var{nm}
111 ## If @var{nm} is a two digit integer and @var{m} is an integer in the
112 ## range 1 to 6, @var{m} is interpreted as the point style. This is only
113 ## valid in combination with the @code{@@} or @code{-@@} specifiers.
114 ##
115 ## @item @var{c}
116 ## If @var{c} is one of @code{"r"}, @code{"g"}, @code{"b"}, @code{"m"},
117 ## @code{"c"}, or @code{"w"}, it is interpreted as the plot color (red,
118 ## green, blue, magenta, cyan, or white).
119 ##
120 ## @item +
121 ## @itemx *
122 ## @itemx o
123 ## @itemx x
124 ## Used in combination with the points or linespoints styles, set the point
125 ## style.
126 ## @end table
127 ##
128 ## The color line styles have the following meanings on terminals that
129 ## support color.
130 ##
131 ## @example
132 ## Number Gnuplot colors (lines)points style
133 ## 1 red *
134 ## 2 green +
135 ## 3 blue o
136 ## 4 magenta x
137 ## 5 cyan house
138 ## 6 brown there exists
139 ## @end example
140 ##
141 ## Here are some plot examples:
142 ##
143 ## @example
144 ## plot (x, y, "@@12", x, y2, x, y3, "4", x, y4, "+")
145 ## @end example
146 ##
147 ## This command will plot @code{y} with points of type 2 (displayed as
148 ## @samp{+}) and color 1 (red), @code{y2} with lines, @code{y3} with lines of
149 ## color 4 (magenta) and @code{y4} with points displayed as @samp{+}.
150 ##
151 ## @example
152 ## plot (b, "*")
153 ## @end example
154 ##
155 ## This command will plot the data in the variable @code{b} will be plotted
156 ## with points displayed as @samp{*}.
157 ## @end deftypefn
158
61 ## See also: semilogx, semilogy, loglog, polar, mesh, contour, __pltopt__ 159 ## See also: semilogx, semilogy, loglog, polar, mesh, contour, __pltopt__
62 ## bar, stairs, gplot, gsplot, replot, xlabel, ylabel, title 160 ## bar, stairs, gplot, gsplot, replot, xlabel, ylabel, title
63 161
64 ## Author: jwe 162 ## Author: jwe
65 163