go = line()
po = line(x, y)
go = line(x, y, z)
go = line(ax, x, y, z)
go = line(ax, x, y, z, propertyName, propertyValue)
| Parameter | Description |
|---|---|
| x, y , z | a scalar graphics object value: parent container, specified as a figure. |
| ax | Target axes: axes object. |
| propertyName | a scalar string or row vector character. |
| propertyValue | a value. |
| Parameter | Description |
|---|---|
| go | a graphics object: line type. |
line(x, y) creates a line in the current axes with vectorsx and y.
line(x, y, z) creates a line in three-dimensional coordinates.
See line properties for the complete property list.
BeingDeleted Flag indicating that the object is being deleted.
f = figure();
x = linspace(0,10)';
y1 = sin(x);
y2 = cos(x);
line(x, y1, 'Color', [0 1 0])
line(x, y2, 'Color', [1 0 0])
f = figure();
x = [1 9];
y = [2 12];
line(x,y,'Color','red','LineStyle','--')
f = figure();
t = linspace(0,10*pi,400);
x = sin(t);
y = cos(t);
z = t;
line(x,y,z)
view(3)
| Version | Description |
|---|---|
| 1.0.0 | initial version |
| 1.7.0 | CreateFcn, DeleteFcn callback added. |
| -- | BeingDeleted property added. |
| -- | Polar line properties added. |