The y coordinate is then generated by the array assignment
PLOT Plot vectors or matrices.
PLOT(X,Y) plots vector X versus vector Y. If X or Y is a matrix,
then the vector is plotted versus the rows or columns of the matrix,
whichever line up.
PLOT(Y) plots the columns of Y versus their index.
If Y is complex, PLOT(Y) is equivalent to PLOT(real(Y),imag(Y)).
In all other uses of PLOT, the imaginary part is ignored.
Various line types, plot symbols and colors may be obtained with
PLOT(X,Y,S) where S is a 1, 2 or 3 character string made from
the following characters:
y yellow . point
m magenta o circle
c cyan x x-mark
r red + plus
g green - solid
b blue * star
w white : dotted
k black -. dashdot
-- dashed
For example, PLOT(X,Y,'c+') plots a cyan plus at each data point.
PLOT(X1,Y1,S1,X2,Y2,S2,X3,Y3,S3,...) combines the plots defined by
the (X,Y,S) triples, where the X's and Y's are vectors or matrices
and the S's are strings.
For example, PLOT(X,Y,'y-',X,Y,'go') plots the data twice, with a
solid yellow line interpolating green circles at the data points.
The PLOT command, if no color is specified, makes automatic use of
the colors specified by the axes ColorOrder property. The default
ColorOrder is listed in the table above for color systems where the
default is yellow for one line, and for multiple lines, to cycle
through the first six colors in the table. For monochrome systems,
PLOT cycles over the axes LineStyleOrder property.
PLOT returns a column vector of handles to LINE objects, one
handle per line.
The X,Y pairs, or X,Y,S triples, can be followed by
parameter/value pairs to specify additional properties
of the lines.
See also SEMILOGX, SEMILOGY, LOGLOG, GRID, CLF, CLC, TITLE,
XLABEL, YLABEL, AXIS, AXES, HOLD, and SUBPLOT.
To make graphics presentations usable, they need some labelling to keep their context clear. Titles, x- and y-axis labels so we know the units and other text annotations help a graph "speak" to the viewer. When you first construct a plot, you typically are so familiar with what the data represents, that this seems necessary. But a week later, you may not recall, for example, the "units" on the x-axis for the data. So it's a good practice to place as much labelling as possible on the plots you produce.
TITLE Titles for 2-D and 3-D plots.
TITLE('text') adds text at the top of the current axis.
TITLE('text','Property1',PropertyValue1,'Property2',PropertyValue2,...)
sets the values of the specified properties of the title.
See also XLABEL, YLABEL, ZLABEL, TEXT.
>> help xlabel
XLABEL X-axis labels for 2-D and 3-D plots.
XLABEL('text') adds text beside the X-axis on the current axis.
XLABEL('text','Property1',PropertyValue1,'Property2',PropertyValue2,...)
sets the values of the specified properties of the xlabel.
See also YLABEL, ZLABEL, TITLE, TEXT.
>> help ylabel
YLABEL Y-axis labels for 2-D and 3-D plots.
YLABEL('text') adds text beside the Y-axis on the current axis.
YLABEL('text','Property1',PropertyValue1,'Property2',PropertyValue2,...)
sets the values of the specified properties of the ylabel.
See also XLABEL, ZLABEL, TITLE, TEXT.
>> help text
TEXT Add Text to the current plot.
TEXT(X,Y,'string') adds the text in the quotes to location (X,Y)
on the current axes, where (X,Y) is in units from the current
plot. If X and Y are vectors, TEXT writes the text at all locations
given. If 'string' is an array the same number of rows as the
length of X and Y, TEXT marks each point with the corresponding row
of the 'string' array.
TEXT(X,Y,Z,'string') adds text in 3-D coordinates.
TEXT returns a column vector of handles to TEXT objects, one
handle per text object. TEXT objects are children of AXES objects.
The X,Y pair (X,Y,Z triple for 3-D) can be followed by
parameter/value pairs to specify additional properties of the text.
The X,Y pair (X,Y,Z triple for 3-D) can be omitted entirely, and
all properties specified using parameter/value pairs.
Execute GET(H), where H is a text handle, to see a list of text
object properties and their current values. Execute SET(H) to see a
list of text object properties and legal property values.
See also XLABEL, YLABEL, ZLABEL, TITLE, GTEXT, LINE, PATCH.