RunMat
GitHub

heatmap — Create heatmap charts in MATLAB and RunMat.

heatmap creates heatmap charts from numeric matrix data. Supported call forms, returned handle behavior, and chart properties follow MATLAB semantics.

Syntax

h = heatmap(CData)
h = heatmap(XValues, YValues, CData)
h = heatmap(XValues, YValues, CData, Name, Value, ...)

Inputs

NameTypeRequiredDefaultDescription
CDataNumericArrayYesM-by-N numeric matrix of color values.
XValuesAnyYesColumn labels (length N).
YValuesAnyYesRow labels (length M).
propsAnyVariadicHeatmap property name/value pairs.

Returns

NameTypeDescription
hNumericScalarHandle to the heatmap chart.

Errors

IdentifierWhenMessage
RunMat:heatmap:InvalidArgumentCData/label/property inputs are malformed or incompatible.heatmap: invalid argument
RunMat:heatmap:InternalInternal render/surface construction fails.heatmap: internal operation failed

How heatmap works

  • heatmap(CData) displays matrix values using default row and column labels.
  • heatmap(XValues, YValues, CData) uses text, string-array, cell-array, or numeric labels for the displayed columns and rows.
  • The returned heatmap handle participates in RunMat's plotting property system.
  • Color rendering uses the shared scaled-image and colormap path.

Examples

Create a labeled heatmap chart

cdata = [45 60 32; 43 54 76; 32 94 68; 23 95 58];
xvalues = {'Small','Medium','Large'};
yvalues = {'Green','Red','Blue','Gray'};
h = heatmap(xvalues,yvalues,cdata);
h.Title = 'T-Shirt Orders';
h.XLabel = 'Sizes';
h.YLabel = 'Colors';

Create a heatmap from matrix data

A = magic(5);
h = heatmap(A);
h.Colormap = 'hot';
h.ColorbarVisible = true;

Using heatmap with coding agents

Open a RunMat example with live inputs, then ask the agent to explain how heatmap changes the result.

Run a small heatmap example, explain the result, then change one input and compare the output.

FAQ

Does heatmap support table inputs?

Not yet. RunMat currently supports matrix CData inputs with optional row and column labels. Table-based MATLAB signatures will be added once table values are represented in the runtime.

2D Charts

area · bar · errorbar · hist · histogram · loglog · pie · plot · scatter · semilogx · semilogy · stairs · stem

3D & Surface

contour · contour3 · contourf · mesh · meshc · plot3 · quiver · scatter3 · surf · surfc

Images

image · imagesc · imshow

Axes & Layout

axis · box · grid · sgtitle · subplot · title · view · zlabel

Appearance

colorbar · colormap · legend · shading

Handle Access

gca · gcf · get · set

Other

cla · clf · figure · fill3 · hold · patch · print · suptitle · xline · yline

More plotting resources

Open-source implementation

Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how heatmap is executed, line by line, in Rust.

About RunMat

RunMat is an open-source runtime that executes MATLAB-syntax code blazing on any GPU. It is licensed under the Apache 2.0 license.

  • RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
  • Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.

Getting started · Benchmarks · Pricing

Download RunMat

Download RunMat for full performance, or use RunMat in your browser for zero setup.