RunMat
  • Pricing
RunMat
GitHub
GitHub
DownloadSign InTry in Browser
DesktopRuntimeServer
RunMat

Run math blazing fast

GitHubX (Twitter)LinkedIn

Company

  • About
  • Pricing
  • Contact

Explore

  • RunMat for academia
  • RunMat vs MATLAB Online
  • Benchmarks

Get product updates and release notes from the RunMat team.

© 2026 Dystr · Made withfor the scientific community.

RunMat™ is a registered trademark of Dystr, Inc. MATLAB® is a registered trademark of The MathWorks, Inc. RunMat is not affiliated with, endorsed by, or sponsored by The MathWorks, Inc.

LicensePrivacy
/
See all docs
Builtin Reference
    • addpoints
    • ancestor
    • animatedline
    • area
    • axes
    • axis
    • bar
    • barh
    • box
    • caxis
    • cla
    • clf
    • clim
    • colorbar
    • colorcube
    • colormap
    • colororder
    • contour
    • contour3
    • contourf
    • copyobj
    • daspect
    • datacursormode
    • dataTipTextRow
    • errorbar
    • fcontour
    • figure
    • fill
    • fill3
    • findobj
    • fsurf
    • gca
    • gcf
    • get
    • gobjects
    • grid
    • groot
    • heatmap
    • hgload
    • hgsave
    • hidden
    • hist
    • histogram
    • histogram2
    • hold
    • image
    • imagesc
    • imshow
    • legend
    • line
    • linkaxes
    • loglog
    • mesh
    • meshc
    • openfig
    • opengl
    • pan
    • parula
    • patch
    • pie
    • plot
    • plot3
    • plotmatrix
    • plotyy
    • polarhistogram
    • polarplot
    • polarscatter
    • print
    • quiver
    • quiver3
    • ribbon
    • saveas
    • savefig
    • scatter
    • scatter3
    • semilogx
    • semilogy
    • set
    • sgtitle
    • shading
    • sphere
    • stackedplot
    • stairs
    • stem
    • subplot
    • subtitle
    • suptitle
    • surf
    • surfc
    • text
    • textscatter
    • textscatter3
    • title
    • triplot
    • view
    • waitbar
    • wordcloud
    • xlabel
    • xlim
    • xline
    • xscale
    • xtickangle
    • xtickformat
    • xticklabels
    • xticks
    • ylabel
    • ylim
    • yline
    • yscale
    • ytickangle
    • ytickformat
    • yticklabels
    • yticks
    • zlabel
    • zlim
    • zoom

heatmap — Create heatmap charts in MATLAB and RunMat.

heatmap creates heatmap charts from numeric matrix data. All eight integer classes remain exact in chart ColorData; a separate normalized renderer representation preserves distinctions between adjacent wide integers.

Syntax

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

Inputs

NameTypeRequiredDefaultDescription
CDataNumericArrayYes—M-by-N numeric matrix of color values.
propsAnyVariadic—Heatmap property name/value pairs.
XValuesAnyYes—Column labels (length N).
YValuesAnyYes—Row labels (length M).

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) and heatmap(CData, Name, Value, ...) display 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.
  • Integer ColorData is retained authoritatively on the chart while exact range-relative normalization supplies the floating renderer boundary.
  • ColorLimits, FontSize, ColorbarVisible, and GridVisible accept documented integer values with exact structural validation; ColorLimits remain public in the source data domain.

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;

Rendered heatmap example

results = [92 88 81 76; 85 91 87 82; 78 84 93 89; 90 86 80 94];
conditions = {'Cold', 'Nominal', 'Hot', 'Vibration'};
components = {'Pump A', 'Pump B', 'Valve A', 'Valve B'};

h = heatmap(conditions, components, results);
h.Title = 'Component Test Score';
h.XLabel = 'Test condition';
h.YLabel = 'Component';
h.Colormap = 'turbo';
h.ColorbarVisible = true;
Expected output:
Component test-score matrix rendered as a MATLAB heatmap in RunMat

Compare this result with other chart types in the MATLAB Plot Gallery.

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.

Related Plotting functions

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

addpoints · ancestor · animatedline · axes · barh · caxis · cla · clf · clim · colorcube · colororder · copyobj · daspect · datacursormode · dataTipTextRow · fcontour · figure · fill · fill3 · findobj · fsurf · gobjects · groot · hgload · hgsave · hidden · histogram2 · hold · line · linkaxes · openfig · opengl · pan · parula · patch · plotmatrix · plotyy · polarhistogram · polarplot · polarscatter · print · quiver3 · ribbon · saveas · savefig · sphere · stackedplot · subtitle · suptitle · text · textscatter · textscatter3 · triplot · waitbar · wordcloud · xlabel · xlim · xline · xscale · xtickangle · xtickformat · xticklabels · xticks · ylabel · ylim · yline · yscale · ytickangle · ytickformat · yticklabels · yticks · zlim · zoom

More plotting resources

  • Styling plots and axes

Open-source implementation

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

  • View the source for heatmap in Rust on GitHub
  • Learn how the RunMat runtime works
  • Found a bug? Open an issue with a minimal reproduction.

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.

Download RunMatOpen Sandbox
On this page
  • Syntax
  • Inputs
  • Returns
  • Errors
  • How heatmap works
  • Examples
  • Create a labeled heatmap chart
  • Create a heatmap from matrix data
  • Rendered heatmap example
  • Using heatmap with coding agents
  • FAQ
  • Related Plotting functions
  • 2D Charts
  • 3D & Surface
  • Images
  • Axes & Layout
  • Appearance
  • Handle Access
  • Other
  • More plotting resources
  • Open-source implementation
  • About RunMat