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

linkaxes — Link axes limits across multiple axes.

linkaxes(ax) links the x- and y-axis limits for a vector of axes handles. linkaxes(ax, option) links only the requested axis limits or removes existing links.

Syntax

linkaxes(ax)
linkaxes(ax, option)

Inputs

NameTypeRequiredDefaultDescription
axAxesHandleYes—Axes handle or numeric array of axes handles to link.
optionStringScalarYes—Link option: 'x', 'y', 'xy', or 'off'.

Errors

IdentifierWhenMessage
RunMat:linkaxes:InvalidArgumentAxes handles, option, or argument count is invalid.linkaxes: invalid argument
RunMat:linkaxes:InternalInternal plotting state update fails.linkaxes: internal operation failed

How linkaxes works

  • linkaxes(ax) is equivalent to linkaxes(ax, 'xy').
  • linkaxes(ax, 'x') links X limits while leaving Y limits independent.
  • linkaxes(ax, 'y') links Y limits while leaving X limits independent.
  • linkaxes(ax, 'xy') links both X and Y limits.
  • linkaxes(ax, 'off') removes the supplied axes from any existing linked-axes groups.
  • When a new link is created, linked axes are synchronized to limits that encompass the current limits of every supplied axes handle for the linked axes.
  • Axis-specific links can overlap. For example, one axes can stay linked to another axes on X limits while also being linked to a different axes on Y limits.

Does RunMat run linkaxes on the GPU?

linkaxes performs no provider dispatch and has no GPU kernel implementation.

GPU memory and residency

linkaxes works with host-side graphics handles and does not move arrays between host and GPU memory.

Examples

Link x limits for two subplots

ax1 = subplot(2,1,1);
ax2 = subplot(2,1,2);
linkaxes([ax1 ax2], 'x');
set(ax1, 'XLim', [0 10]);
get(ax2, 'XLim')

Expected output:

ans = [0 10]

Remove a link

linkaxes([ax1 ax2], 'off');

Using linkaxes with coding agents

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

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

FAQ

Does linkaxes create axes?⌄

No. It requires existing axes handles such as values returned from subplot, axes, or gca.

Does linking affect future set(ax, 'XLim', ...) calls?⌄

Yes. Linked limits propagate through RunMat's central axes-limit state path, including xlim, ylim, set, and zoom-related limit updates. Unlinked axes continue to use the direct limit-update path.

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 · hold · line · 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 linkaxes is executed, line by line, in Rust.

  • View the source for linkaxes 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 linkaxes works
  • Does RunMat run linkaxes on the GPU?
  • GPU memory and residency
  • Examples
  • Link x limits for two subplots
  • Remove a link
  • Using linkaxes with coding agents
  • FAQ
  • Related Plotting functions
  • 2D Charts
  • 3D & Surface
  • Images
  • Axes & Layout
  • Appearance
  • Handle Access
  • Other
  • Open-source implementation
  • About RunMat