# plot3

3-D line plot.

## Syntax

* plot3(X1, Y1, Z1, ...)
* plot3(X1, Y1, Z1, LineSpec, ...)
* plot3(..., propertyName, propertyValue, ...)
* plot3(ax, ...)
* go = plot3(...)

## Input argument

* X1 - x-coordinates: vector or matrix.
* Y1 - y-coordinates: vector or matrix.
* Z1 - z-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

plot3(X1, Y1, Z1, ...)plots one or more lines in three-dimensional space.

go = plot3(...) returns a column vector of line graphics objects.

see line or plot for more information about properties

## Examples

```matlab
f  = figure();
t = 0:pi/50:10*pi;
L = plot3(sin(t), cos(t), t);
axis square
```

![](https://160667757-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LdPvJ6mJve3gz5MU4d1%2Fuploads%2Fgit-blob-9eed57aef8b3e3b4244894fb52f4a9149441a5a3%2Fplot3_1_1EE364C1.svg?alt=media)

```matlab
f  = figure();
t = 0:0.1:10*pi;
r = linspace (0, 1, length(t));
z = linspace (0, 1, length(t));
h = plot3 (r .* cos (t), r .* sin (t), z);
ylabel ('r .* sin (t)');
xlabel ('r .* cos (t)');
zlabel ('z');
title (_('plot3 display of 3-D helix'));
axis square
```

![](https://160667757-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LdPvJ6mJve3gz5MU4d1%2Fuploads%2Fgit-blob-e549fc48147d59afa5433a4040219f49a6acc6db%2Fplot3_2_F084144A.svg?alt=media)

## See also

[line](line), [plot](plot).

## History

| Version | Description     |
| ------- | --------------- |
| 1.0.0   | initial version |

## Author

Allan CORNET
