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

set — Set figure, axes, and graphics-object properties through handle workflows.

set applies property/value pairs to figure, axes, legend, text, and plot-child handles. Accepted properties and classes are owned by each graphics object; unsupported-property handling still differs among legacy plot-child setters.

Syntax

set(h, property, value, ...)
status = set(h, property, value, ...)

Inputs

h
Type
Any
Required
Yes
Description
Live figure, axes, plot, text, or legend handle.
pairs
Type
Any
Required
Variadic
Description
One or more property/value pairs.
NameTypeRequiredDefaultDescription
hAnyYes—Live figure, axes, plot, text, or legend handle.
pairsAnyVariadic—One or more property/value pairs.

Returns

status
Type
StringScalar
Description
Returns `ok` when property updates succeed.
NameTypeDescription
statusStringScalarReturns `ok` when property updates succeed.

Errors

RunMat:set:InvalidArgument
When
A handle, property-name shape, property/value pair, or owner-validated value is invalid. Some legacy plot-child setters still ignore unsupported style names or values.
Message
set: invalid argument
RunMat:set:Internal
When
Graphics update or source-data readback fails after admission.
Message
set: internal operation failed
IdentifierWhenMessage
RunMat:set:InvalidArgumentA handle, property-name shape, property/value pair, or owner-validated value is invalid. Some legacy plot-child setters still ignore unsupported style names or values.set: invalid argument
RunMat:set:InternalGraphics update or source-data readback fails after admission.set: internal operation failed

Behavior

set(h, 'Property', value, ...) requires a handle followed by one or more property/value pairs. The status output is ok on success; a call without an assigned output still performs the update.

Axes-local state includes limits, logarithmic modes, grid and legend visibility, and font size. Child plots support line width, display names, markers, and data coordinates. Legend and text handles use the same public property surface.

Integer acceptance is property-specific. Numeric widths, sizes, limits, positions, and counts validate native integer values at their named boundary; text and enum properties still require text.

For line, scatter, and 3-D line data, coordinate values and selected controls are validated before one guarded plot-element update. Some style setters still ignore unsupported values or names; style admission is not yet uniform. Other graphics families retain their owning setter behavior, and a single call is not a general transaction across independent objects.

Execution and source data

Plot-child updates can read plotting-owned GPU source coordinates before changing data or styles. Such readback may suspend and preserves the original provider error cause. It is a graphics-state operation, not an array GPU kernel or an implicit upload.

The plot source is snapshotted with its lease before readback. If the figure or child changes while the readback is pending, the guarded update fails without publishing stale coordinates. Dropping an unpolled call makes no change.

Examples

Style a plotted line

h = plot(0:0.1:1, (0:0.1:1).^2);
set(h, 'Color', 'r', 'LineWidth', 2, 'DisplayName', 'quadratic');

Change axes-local state

ax = subplot(1, 2, 2);
plot(1:5, [2 3 5 4 1]);
set(ax, 'XScale', 'log', 'Grid', false, 'FontSize', 12);

Change legend placement and orientation

plot(1:5, 1:5);
lg = legend('series');
set(lg, 'Location', 'southwest', 'Orientation', 'horizontal');

Using set with coding agents

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

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

FAQ

Can I set multiple properties in one call?⌄

Yes. Pass alternating property/value pairs, such as set(h,'Color','r','LineWidth',2). The line, scatter, and 3-D line owner validates coordinates and selected controls before one guarded plot update; style validation and other handle families are not uniformly transactional.

Which line properties are common?⌄

Color, LineWidth, LineStyle, Marker, and DisplayName cover typical styling. DisplayName feeds the legend when it is created without explicit labels. For example, create the line with h = plot(x,y);, then use set(h,'Color',[0.2 0.6 0.8],'LineWidth',1.5,'DisplayName','measured').

What if a property is unsupported?⌄

Property availability depends on the handle family; inspect get(h) first. Many owners report an error, but some legacy plot-child setters currently ignore unknown names, so do not rely on a uniform rejection guarantee.

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

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

Source you can read

Every RunMat function's source is public. Read exactly how set is executed, line by line, in Rust.

  • View the source for set in Rust on GitHub
  • Learn how the RunMat runtime works
  • Found a bug? Open an issue with a minimal reproduction.

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
  • Execution and source data
  • Examples
  • Style a plotted line
  • Change axes-local state
  • Change legend placement and orientation
  • Using set with coding agents
  • FAQ
  • Related Plotting functions
  • 2D Charts
  • 3D & Surface
  • Images
  • Axes & Layout
  • Appearance
  • Handle Access
  • Other
  • More plotting resources
  • Source you can read
  • About RunMat