RunMat
  • Pricing
RunMat
GitHub
GitHub
Sign inTry in browser
DesktopRuntimePhysicsCADAdministrationAgent

Get RunMat updates

New releases, guides and examples.

Product+
  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download
Math+
  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting
Physics+
  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA
Industries+
  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance
Learn+
  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students
Compare+
  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons
Company+
  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms

Product

  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download

Math

  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting

Physics

  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA

Industries

  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance

Learn

  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students

Compare

  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons

Company

  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms
GitHubXLinkedIn

© Dystr, Inc. · RunMat v0.7.1, Nov 17, 2026

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.

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

colormap — Set or query a plotting colormap.

colormap sets or queries the color palette for the current or explicitly targeted plotting context. Public custom maps accept m-by-3 single or double RGB values in [0,1], or uint8 RGB values in [0,255]. Query output is a normalized host double matrix.

Syntax

cmap = colormap()
cmap = colormap(target)
colormap(name)
colormap(map)
colormap(target, map)

Inputs

target
Type
Any
Required
Yes
Description
Target figure or axes handle.
name
Type
StringScalar
Required
Yes
Description
Colormap name.
map
Type
NumericArray
Required
Yes
Description
m-by-3 single/double RGB map in [0,1], or uint8 RGB map in [0,255].
map
Type
Any
Required
Yes
Description
Colormap name or m-by-3 numeric RGB map.
NameTypeRequiredDefaultDescription
targetAnyYes—Target figure or axes handle.
nameStringScalarYes—Colormap name.
mapNumericArrayYes—m-by-3 single/double RGB map in [0,1], or uint8 RGB map in [0,255].
mapAnyYes—Colormap name or m-by-3 numeric RGB map.

Returns

cmap
Type
NumericArray
Description
Current colormap as an m-by-3 normalized double RGB matrix.
NameTypeDescription
cmapNumericArrayCurrent colormap as an m-by-3 normalized double RGB matrix.

Errors

RunMat:colormap:InvalidArgument
When
Colormap input is missing, unknown, or not a valid m-by-3 RGB array.
Message
colormap: invalid argument
RunMat:colormap:TooManyOutputs
When
More than one output is requested.
Message
colormap: at most one output is supported
IdentifierWhenMessage
RunMat:colormap:InvalidArgumentColormap input is missing, unknown, or not a valid m-by-3 RGB array.colormap: invalid argument
RunMat:colormap:TooManyOutputsMore than one output is requested.colormap: at most one output is supported

Behavior

Supported colormap names include parula, colorcube, viridis, plasma, inferno, magma, turbo, jet, hot, cool, spring, summer, autumn, winter, gray, bone, copper, pink, and lines.

Named colormaps are also available as RGB array generator functions, so MATLAB forms such as colormap(jet), colormap(gray(64)), and c = turbo(128) are supported.

Queries and setters return the current or newly assigned m-by-3 normalized host double RGB matrix.

Public RGB maps are m-by-3 single or double arrays in [0,1], or uint8 arrays in [0,255]. uint8 channels are normalized by division by 255 at the host graphics-state boundary.

The other seven integer classes are a RunMat extension. They are accepted only when every native integer channel is exactly 0 or 1, and strict compatibility mode rejects the form before conversion.

Resident RGB maps are rejected without provider access; colormap metadata and query results are host-resident.

Unknown colormap names raise errors rather than silently falling back.

Colormap state composes naturally with colorbar, imagesc, surf, and filled contour plots.

Default RunMat untargeted calls query or change the current axes. MATLAB compatibility mode untargeted calls query or change the current figure palette. Explicit axes targets preserve other axes; explicit figure setters update all existing axes and the default inherited by new or reset axes. Targeted calls do not change selection.

Named palettes retain the addressed target's current length. colormap('default') restores the 256-row parula palette. Figure palette queries remain distinct from a selected axes override, including after save/replay.

Placement and display

These commands update shared graphics state and may notify figure observers. Numeric array acceleration remains with the original plotting/rendering pipeline; the commands do not launch array-provider kernels. Graphics display requires a browser graphics host or a desktop graphics host.

Control arguments must already be host values. Unsupported resident controls reject without provider downloads; existing resident plot buffers stay owned by their plotting/rendering paths. Invalid syntax and excess output requests are checked before creating or changing graphics state.

Examples

Apply a palette to a scaled image

[X, Y] = meshgrid(linspace(-3, 3, 60), linspace(-3, 3, 60));
A = sin(X) .* cos(Y);
imagesc(A);
colormap('jet');
colorbar;

Compare palettes across subplots

[X,Y] = meshgrid(linspace(-3,3,40)); Z = sin(X).*cos(Y);
ax1 = subplot(1,2,1); surf(X,Y,Z); colormap(ax1,'parula');
ax2 = subplot(1,2,2); contourf(X,Y,Z); colormap(ax2,'turbo');

Apply a generated RGB colormap matrix

surf(peaks(40)); requested = parula(128); actual = colormap(requested); colorbar on;

Apply a MATLAB-style named colormap generator

imagesc([1 2;3 4]); c = colormap(jet);

Set figure defaults and override one axes

imagesc([1 2;3 4]); fig = gcf; expected = hot(7); actual = colormap(fig,expected);
ax1 = gca; colormap(ax1,jet(3)); ax2 = subplot(1,2,2);

Using colormap with coding agents

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

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

FAQ

What colormaps are available?⌄

RunMat ships with: parula, colorcube, viridis, plasma, inferno, magma, turbo, jet, hot, cool, spring, summer, autumn, winter, gray, bone, copper, pink, and lines. Unknown names raise an error — no silent fallback.

Which colormaps are perceptually uniform?⌄

viridis, plasma, inferno, and magma are designed so that equal steps in data value produce equal perceptual changes in color. Use these for quantitative data where you want the visual contrast to faithfully represent magnitude differences. parula is also a good default. Avoid jet for quantitative work — it introduces false banding.

Can I define a custom colormap?⌄

Yes. Pass an m-by-3 single or double matrix in [0,1], or a uint8 matrix in [0,255]. RunMat mode also admits other integer classes when every channel is exactly 0 or 1.

Related Plotting functions

2D Charts

area · bar · errorbar · heatmap · 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 · legend · shading

Handle Access

gca · gcf · get · set

Other

addpoints · ancestor · animatedline · autumn · axes · barh · bone · caxis · cla · clf · clim · colorcube · colororder · cool · copper · copyobj · cylinder · daspect · datacursormode · dataTipTextRow · drawnow · fcontour · figure · fill · fill3 · findobj · fsurf · gobjects · gray · groot · hgload · hgsave · hidden · histogram2 · hold · hot · inferno · isgraphics · ishandle · jet · line · lines · linkaxes · magma · openfig · opengl · pan · parula · patch · pink · plasma · plotmatrix · plotyy · polarhistogram · polarplot · polarscatter · print · quiver3 · ribbon · saveas · savefig · sphere · spring · stackedplot · subtitle · summer · suptitle · text · textscatter · textscatter3 · triplot · turbo · viridis · waitbar · winter · wordcloud · xlabel · xlim · xline · xscale · xtickangle · xtickformat · xticklabels · xticks · ylabel · ylim · yline · yscale · ytickangle · ytickformat · yticklabels · yticks · zlim · zoom

More plotting resources

  • Choosing the right plot type
  • Styling plots and axes
  • Plot replay and export
  • Complete plotting guide

About RunMat

RunMat is a runtime that executes MATLAB-syntax code fast on any GPU. The runtime is free for individuals, including freelancers; students and faculty at an academic institution, for teaching or research there; contributors to an open-source project, for work on that project; organizations with 250 or fewer people and US$10M or less in annual revenue; and anyone, for non-production use. See runmat.com/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
  • Behavior
  • Placement and display
  • Examples
  • Apply a palette to a scaled image
  • Compare palettes across subplots
  • Apply a generated RGB colormap matrix
  • Apply a MATLAB-style named colormap generator
  • Set figure defaults and override one axes
  • Using colormap with coding agents
  • FAQ
  • Related Plotting functions
  • 2D Charts
  • 3D & Surface
  • Images
  • Axes & Layout
  • Appearance
  • Handle Access
  • Other
  • More plotting resources
  • About RunMat