Skip to content

contour3

3D contour plot.

[C, h] = contour3(Z, ...)

Draws contour lines in 3D space — each contour at its corresponding Z height. Useful as overlays on surface plots.

contour3(peaks(50), 30)
  • contour — Contour plot of a 2D scalar field.
  • contourf — Filled contour plot.
  • surf — 3D surface plot with colored faces.