Thin re-exports of vellum::linear_gradient() and vellum::radial_gradient().
A gradient is an unscaled value for the fill aesthetic: pass it directly,
e.g. mark_area(x = t, y = y, fill = linear_gradient(c("#00e5ff", "#00e5ff00"))),
and the filled region (area / ribbon / bar) is painted with the paint as a
single grob. Use "transparent" (or an "#RRGGBB00" colour) as a stop to fade
out — the "glow fade under a line" look. The gradient's x1/y1/x2/y2
(in units, "npc" by default) set its direction. A gradient cannot be
mapped to a data column (it is one paint per region).
Arguments
- colours, stops
- ...
Further gradient arguments passed to the vellum constructor:
x1/y1/x2/y2(linear),cx/cy/rplus the optional focal circlefx/fy/fr(radial),units,extend, andinterpolation("srgb"default, or"oklab"/"oklch"to blend the stops perceptually —"oklch"additionally preserves chroma by rotating hue). Seevellum::linear_gradient()/vellum::radial_gradient().

