comparison scripts/plot/plot.m @ 3426:f8dde1807dee

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