heatmap

heatmapNode

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 @let keeps the shared expression written once. As with contour, y is the vertical axis, not a parameter.

Only withxyargandpolarplane

#Attributes

expressionRequiredImplicitAnimatable
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
rangeAnimatable
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.
invertAnimatable
Flip the ramp, putting deep colour at low values rather than high.
Defaultfalse
colourAnimatable
neutralredorangeyellowgreentealbluepurplepinkgreywhiteblackmulticolourtemperature
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.
Defaultmulticolour
opacityAnimatable
How heavy the wash sits over the plot.
Default0.75
hiddenAnimatable
Declared but not drawn — animatable, so hidden: true !cue.to{false}(at: 2) is its reveal.
Defaultfalse
Also written: lockedA reader may not edit it on an editable graph.
Defaultfalse
layerAnimatable
Paint order among the marks: a higher layer is drawn later, on top; equal or omitted, the marks stack in document order (later on top). Written z: before the argand plane took that letter for its coordinate.

#Derived attributes

Computed while the element renders — read one with #id.name in attribute position or {{#id.name}} in prose, never set.

minDerived
The smallest value the surface takes over the sampled window. Cite it with {{#id.min}}.
maxDerived
The largest value the surface takes over the sampled window.

#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)