Skip to content

heatmap

plot · scripts/plot/draw/heatmap.m

: h = heatmap (cdata)
: h = heatmap (x, y, cdata)
: h = heatmap (tbl, xvar, yvar)
: h = heatmap (tbl, xvar, yvar, Name, Value, …)

Heatmap chart (MATLAB Graphics compat, R2026a signatures).

Table form aggregates (count by default, or mean when 'ColorVariable' is set). Matrix form uses pre-aggregated cdata. Name-value options include ColorVariable, ColorMethod, and ColorScaling ('scaled'|'scaledcolumns'|'scaledrows'|'log').

Returns a struct with HeatmapChart-compatible properties (ColorData, ColorScaling, …). Under headless batch the chart is not drawn; with graphics enabled, imagesc is used.