plot
Linear 2-D plot.
📝 Syntax
plot(Y)
plot(X1, Y1, ...)
plot(X1, Y1, LineSpec, ...)
plot(..., propertyName, propertyValue, ...)
plot(ax, ...)
go = plot(...)
📥 Input argument
X1 - x-coordinates: vector or matrix.
Y1 - y-coordinates: vector or matrix.
LineSpec - Line style, marker, and/or color: character vector or scalar string.
ax - a scalar graphics object value: parent container, specified as a axes.
propertyName - a scalar string or row vector character. see help of 'line' for property list.
propertyValue - a value.
📤 Output argument
go - a graphics object: line type.
📄 Description
plot(Y) plots the columns of Y versus their index.
plot(X, Y) plots line defined by X versusY pair.
go = plot(...) returns a column vector of line graphics objects.
LineSpec is a string used to change the characteristics of the line and is composed of three optional parts in any order:
The SymbolSpec specifies the symbol to be drawn at each data point:
'o'
Circle symbol
'x'
Times symbol
'+'
Plus symbol
'*'
Asterisk symbol
'.'
Dot symbol
's'
Square symbol
'd'
Diamond symbol
'v'
Downward-pointing triangle symbol
'^'
Upward-pointing triangle symbol
'>'
Left-pointing triangle symbol
'<'
Right-pointing triangle symbol
The LineStyleSpec specifies the line style to use for each data series:
'-'
Solid line style
'--'
Dashed line style
'-.'
Dot-Dash-Dot-Dash line style
':'
Dotted line style
The ColorSpec specifies the line color to use for each data series:
'k'
Color Black
'y'
Color Yellow
'm'
Color Magenta
'c'
Color Cyan
'r'
Color Red
'b'
Color Blue
'g'
Color Green
seeline for more information about properties
💡 Examples
Default abscissae using indices:
Using explicit abscissae:
Multiple curves with shared abscissae:
Color and Size of Markers:
Adding Title and Axis Labels:
🔗 See also
line, plot3, name=value syntax.
🕔 History
1.0.0
initial version
Last updated
Was this helpful?