FUNCTION REFERENCE
plot
2-D line plot.
2-D line plot.
Syntax
plot(y)Syntax
plot(x, y)Syntax
plot(x, y, style)Syntax
plot(x1, y1, style1, x2, y2, style2)Syntax
plot(x, y, 'LineWidth', 2, 'Color', 'red')Draws y against x in the current figure. With one input, x is 1, 2, 3, ...
style is a short text such as 'r--o' (color, line style, marker).
Name-value pairs at the end apply to the new lines, including Tag and UserData.
Use hold on to add lines instead of replacing them.
Complex Z in plot(Z) draws real(Z) against imag(Z).
Supports datetime, duration, and categorical coordinate arrays (also in line, scatter, bar, area, stairs, and stem).
Example
x = 0:0.1:10; plot(x, sin(x), 'r--')Differences from MATLAB: up to 16 figures and 64 lines per figure; many line
properties are not supported yet.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.