Skip to content

plot3

3D line plot.

h = plot3(x, y, z, ...)

Plots a 3D line through the points (x(i), y(i), z(i)). Same name-value-pair conventions as plot.

t = linspace(0, 6*pi, 100);
plot3(cos(t), sin(t), t, 'LineWidth', 2)
  • plot — 2D line / marker plot.
  • line3d — 3D line plot with thick rendering.
  • scatter3 — 3D scatter plot.