Skip to content

fill

Filled 2D polygon.

h = fill(x, y, c, ...)

Fills the polygon with vertices (x, y) using color c (string, RGB, or numeric mapped to colormap). Multiple polygons can be drawn from matrix inputs (one per column).

fill([0 1 1 0], [0 0 1 1], 'b') % blue square
  • fill3 — Filled 3D polygon.
  • patch — Generic polygon (2D or 3D).
  • area — Area plot — line plot with filled area below.