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

daspect — Query or set axes data aspect ratio.

daspect controls the data aspect ratio for the current or specified axes. RunMat supports ratio query, positive three-element ratio assignment, mode query, auto/manual mode assignment, and the corresponding DataAspectRatio and DataAspectRatioMode axes properties.

Syntax

ratio = daspect()
daspect(ratio)
mode = daspect('mode')
daspect(mode)
ratio = daspect(ax)
mode = daspect(ax, 'mode')
daspect(ax, ratio_or_mode)

Inputs

ratio
Type
NumericArray
Required
Yes
Description
Three-element positive numeric data aspect ratio.
mode
Type
StringScalar
Required
Yes
Description
Mode string: 'auto', 'manual', or 'mode'.
ax
Type
AxesHandle
Required
Yes
Description
Target axes handle.
ratio_or_mode
Type
Any
Required
Yes
Description
Ratio vector or mode string.
NameTypeRequiredDefaultDescription
ratioNumericArrayYes—Three-element positive numeric data aspect ratio.
modeStringScalarYes—Mode string: 'auto', 'manual', or 'mode'.
axAxesHandleYes—Target axes handle.
ratio_or_modeAnyYes—Ratio vector or mode string.

Returns

ratio
Type
NumericArray
Description
Current data aspect ratio [dx dy dz].
mode
Type
StringScalar
Description
Current data aspect ratio mode, 'auto' or 'manual'.
NameTypeDescription
ratioNumericArrayCurrent data aspect ratio [dx dy dz].
modeStringScalarCurrent data aspect ratio mode, 'auto' or 'manual'.

Returned values from daspect depend on how many outputs the caller requests.

Errors

RunMat:daspect:InvalidArgument
When
Argument count, axes handle, ratio vector, or mode string is invalid.
Message
daspect: invalid argument
RunMat:daspect:Internal
When
Internal plotting state update fails.
Message
daspect: internal operation failed
RunMat:daspect:TooManyOutputs
When
More than one query output is requested.
Message
daspect: too many output arguments
IdentifierWhenMessage
RunMat:daspect:InvalidArgumentArgument count, axes handle, ratio vector, or mode string is invalid.daspect: invalid argument
RunMat:daspect:InternalInternal plotting state update fails.daspect: internal operation failed
RunMat:daspect:TooManyOutputsMore than one query output is requested.daspect: too many output arguments

Behavior and execution

daspect([dx dy dz]) sets DataAspectRatioMode to manual.

Ratio and mode setter forms are statement-only and do not return a value; assigning an output from a setter is rejected.

MATLAB documents all eight integer classes as well as single and double ratio vectors. RunMat validates integer shape and positivity from authoritative storage, then crosses once into the double-valued graphics property.

Logical, complex, nonvector, and GPU-resident ratio inputs are rejected without provider access.

RunMat's numeric or typed-integer encoded axes handles are available only through the daspect-numeric-axes-handle-alias extension; the public MATLAB contract uses an Axes object.

daspect('auto') and set(gca,'DataAspectRatioMode','auto') preserve the stored ratio but return display bounds to automatic aspect fitting.

RunMat applies manual X/Y data aspect ratios to 2-D display bounds and X/Y/Z data aspect ratios to 3-D camera-fit bounds.

RunMat currently represents axes with numeric aliases; strict compatibility mode therefore rejects explicit numeric target aliases.

daspect reads and writes axes metadata. Manual data aspect ratios are applied by the plotting display-bounds and camera-fit paths; numeric plot buffers are not gathered or transformed.

daspect is axes metadata only. It does not gather, upload, or mutate numeric GPU buffers; rendering applies the stored aspect metadata through the normal plot camera/bounds path.

Queries produce a host double 1-by-3 ratio or a host string mode. More than one output rejects before state access. Unknown controls remain dynamic in inference, rather than claiming a ratio from argument shape alone.

All runtime paths share the existing axes metadata and display-bounds/camera-fit owners. Shared figure updates may invoke host observers. Numeric aliases reference local graphics state, not transferable graphics ownership.

Examples

Set and query the data aspect ratio

plot(0:10, sin(0:10));
daspect([1 2 1]);
get(gca, 'DataAspectRatio')

Expected output:

ans =
     1     2     1

Target a specific subplot using a RunMat axes alias

ax = subplot(1,2,1);
plot(ax, 1:4, [1 4 9 16]);
daspect(ax, [1 1 1]);
daspect(ax, 'mode')

Expected output:

ans =
    'manual'

Using daspect with coding agents

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

Run a small daspect example, explain the result, then change one input and compare the 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 · autumn · axes · barh · bone · caxis · cla · clf · clim · colorcube · colororder · cool · copper · copyobj · cylinder · 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

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 and execution
  • Examples
  • Set and query the data aspect ratio
  • Target a specific subplot using a RunMat axes alias
  • Using daspect with coding agents
  • Related Plotting functions
  • 2D Charts
  • 3D & Surface
  • Images
  • Axes & Layout
  • Appearance
  • Handle Access
  • Other
  • About RunMat