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

hold — Control plot replacement versus appending in MATLAB and RunMat.

hold controls whether new plotting commands append to the current axes or replace existing plot objects. Per-axes hold state and command forms follow MATLAB semantics.

Syntax

hold()
hold(mode)
hold(ax, mode)

Inputs

NameTypeRequiredDefaultDescription
modeAnyNo"toggle"Hold mode ('on'|'off'|'all') or numeric/logical scalar.
axAxesHandleYes—Target axes.
modeAnyYes—Hold mode ('on'|'off'|'all') or numeric/logical scalar.

Errors

IdentifierWhenMessage
RunMat:hold:InvalidArgumentHold mode argument is unsupported.hold: invalid argument

How hold works

  • hold() toggles the current hold state.
  • hold('on') enables appending to the current axes.
  • hold('off') disables appending so later plots replace the axes contents.
  • hold('all') is currently treated the same as hold('on').
  • Logical and numeric scalar inputs are accepted: zero means off and one means on.
  • An axes handle can be supplied before the mode to update that axes.

Does RunMat run hold on the GPU?

hold performs no provider dispatch; it updates per-axes plotting state in the host-side registry.

GPU memory and residency

hold only mutates plotting state and does not affect array residency.

Examples

Append a second line to the same axes

x = 0:0.1:1;
plot(x, x);
hold on;
plot(x, x.^2);

Expected output:

% both lines remain visible on the current axes

Disable appending again

hold off;
plot(1:5, [5 4 3 2 1]);

Expected output:

% the new plot replaces the previous axes contents

Toggle hold state

hold();
hold();

Expected output:

% each call toggles the current axes hold state

Using hold with coding agents

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

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

FAQ

Is hold state per figure or per axes?⌄

It is tracked per axes, so one subplot can be in hold mode while another is not.

What does hold('all') do?⌄

RunMat currently treats 'all' the same as 'on'.

Does hold return the current state?⌄

No. hold mutates axes state and has no public output.

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 · 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 · 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

Open-source implementation

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

  • View the source for hold 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
  • Errors
  • How hold works
  • Does RunMat run hold on the GPU?
  • GPU memory and residency
  • Examples
  • Append a second line to the same axes
  • Disable appending again
  • Toggle hold state
  • Using hold with coding agents
  • FAQ
  • Related Plotting functions
  • 2D Charts
  • 3D & Surface
  • Images
  • Axes & Layout
  • Appearance
  • Handle Access
  • Other
  • Open-source implementation
  • About RunMat