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

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

ax
Type
AxesHandle
Required
Yes
Description
Axes handle or numeric array of axes handles to link.
option
Type
StringScalar
Required
Yes
Description
Link option: 'x', 'y', 'xy', or 'off'.
NameTypeRequiredDefaultDescription
axAxesHandleYes—Axes handle or numeric array of axes handles to link.
optionStringScalarYes—Link option: 'x', 'y', 'xy', or 'off'.

Errors

RunMat:linkaxes:InvalidArgument
When
Axes handles, option, or argument count is invalid.
Message
linkaxes: invalid argument
RunMat:linkaxes:Internal
When
Internal plotting state update fails.
Message
linkaxes: internal operation failed
RunMat:linkaxes:TooManyOutputs
When
Any output is explicitly requested.
Message
linkaxes: too many output arguments
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
RunMat:linkaxes:TooManyOutputsAny output is explicitly requested.linkaxes: too many output arguments

Behavior

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.

The numeric handle array may have any rank. Duplicates are deduplicated by the shared link owner; an empty array is accepted. Fewer than two distinct handles creates no new link, while the requested link-axis memberships of supplied handles are removed.

This command has no outputs. Explicit output requests fail before linking or unlinking; implicit and zero-output statements execute normally. All supplied handles and the mode are validated before linked-limit mutation.

Integer handle storage is decoded exactly and must represent valid existing axes. Resident or sparse handles are unsupported; no automatic upload or download is introduced. Linked state and handle identities are local to the graphics host, not implicitly transferable to workers or foreign runtimes.

Host figure updates can invoke observers.

Placement

linkaxes updates host-side graphics state only and does not execute numeric GPU kernels.

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

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

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

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

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

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
  • Errors
  • Behavior
  • Placement
  • 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
  • About RunMat