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

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

set applies property/value pairs to graphics handles. It supports MATLAB-compatible property assignment across figure, axes, legend, text, and plot-object handles using forms like set(h, 'Property', value).

Syntax

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

Inputs

NameTypeRequiredDefaultDescription
hAnyYes—Graphics handle (figure, axes, plot object, text, legend, etc.).
pairsAnyVariadic—Property/value pairs to assign (for example 'LineWidth', 2).

Returns

NameTypeDescription
statusStringScalarReturns "ok" when property updates succeed.

Errors

IdentifierWhenMessage
RunMat:set:InvalidArgumentHandle value is invalid or property/value pairs are missing/malformed/unsupported.set: invalid argument
RunMat:set:InternalInternal handle/property mutation fails unexpectedly.set: internal operation failed

How set works

  • set requires a plotting handle followed by one or more property/value pairs.
  • Different handle families accept different properties, and unsupported properties raise plotting errors rather than silently succeeding.
  • Axes-local state such as limits, log modes, legend visibility, and axes font size can be updated through axes handles.
  • Plot-child properties such as line width, display names, marker styling, and selected object semantics are updated in place through the returned plot handles.
  • Legend and text objects participate in the same property path, so figure annotation workflows stay consistent with the rest of the handle model.
  • Whether an integer property value is valid depends on the selected graphics property. Numeric properties such as widths, sizes, limits, positions, and counts validate the integer value at their property-specific scalar or vector boundary; text and enum properties continue to require text.

Examples

Style a line after plotting

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

Update axes-local state through an axes handle

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

Change a legend after it has been created

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 a single call?⌄

Yes. Pass alternating property/value pairs: set(h, 'Color', 'r', 'LineWidth', 2, 'DisplayName', 'trend'). All updates apply atomically to the same handle.

What are the most commonly used properties to set on a line handle?⌄

'Color', 'LineWidth', 'LineStyle', 'Marker', and 'DisplayName' cover most styling needs. 'DisplayName' is especially useful — it feeds directly into legend when you call it without explicit labels.

h = plot(x, y);
set(h, 'Color', [0.2 0.6 0.8], 'LineWidth', 1.5, 'DisplayName', 'measured');
What happens if I pass a property name that the handle doesn't support?⌄

RunMat raises a plotting error immediately. It doesn't silently ignore unknown properties, so typos in property names surface right away rather than producing subtle bugs.

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

More plotting resources

  • Choosing the right plot type
  • Styling plots and axes
  • Plot replay and export
  • Complete plotting guide

Open-source implementation

Unlike proprietary runtimes, every RunMat function is open-source. 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 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
  • Returns
  • Errors
  • How set works
  • Examples
  • Style a line after plotting
  • Update axes-local state through an axes handle
  • Change a legend after it has been created
  • Using set with coding agents
  • FAQ
  • Related Plotting functions
  • 2D Charts
  • 3D & Surface
  • Images
  • Axes & Layout
  • Appearance
  • Handle Access
  • Other
  • More plotting resources
  • Open-source implementation
  • About RunMat