heatmap
The same surface a contour traces, shaded instead: one expression in x AND y, grid-sampled over the visible window and drawn as a continuous wash of the mark's hue — bare where the value is low, full where it is high. The two marks compose: a heatmap under a contour shades the field and traces its level sets over it, and keeps the shared expression written once. As with contour, y is the vertical axis, not a parameter.
Only withplane
#Attributes
Also written: exp, f, func, functionMath expression for the surface's value at (x, y). Free letters beyond x and y are parameters.Can be written as shorthand: heatmap:value
The value window the ramp spans, e.g.
[0, 40]; values outside clamp. Absent, the ramp spans the sampled extrema — which re-normalises as a parameter drags; an authored range holds still, exactly as an authored domain does.colour
Also written: colormulticolour (the default) runs the full spectrum, violet low to red high; temperature is the blue → white → red wash — pair it with a symmetric
range: to pin white at zero; any ordinary hue shades its own intensity ramp instead. Both ramps are fixed colours, identical in light and dark mode.Default
multicolourDeclared but not drawn — animatable, so
hidden: true !cue.to{false}(at: 2) is its reveal.Default
false#Derived attributes
Computed while the element renders — read one with #id.name in attribute position or {{#id.name}} in prose, never set.
min
{{#id.min}}.max
#Allowed in
#Examples
heatmap(expression: x*y; range: [-9, 9]; colour: temperature)heatmap(expression: x^2 + y^2)heatmap(expression: (x - 2)^2 + (y - 3)^2; colour: red; invert: true)heatmap(expression: {{sse}}; opacity: 0.5)
contour(expression: {{sse}}; at: 1, 2, 4, 8, 16)