set — Update figure, axes, and plot-object properties through RunMat’s graphics handles and MATLAB-style set workflows.
set applies property/value pairs to plotting handles. In RunMat, it is the public write path for the shared graphics object model: you can update text handles, legend handles, axes handles, and plot-child handles such as lines, stems, error bars, histograms, images, contour objects, and more through a MATLAB-style set(h, 'Property', value) interface.
How set works in RunMat
setrequires 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, and legend visibility 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.
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);Change a legend after it has been created
plot(1:5, 1:5);
lg = legend('series');
set(lg, 'Location', 'southwest', 'Orientation', 'horizontal');Related functions to explore
These functions work well alongside set. Each page has runnable examples you can try in the browser.
Open-source implementation
Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how set works, line by line, in Rust.
- View set.rs on GitHub
- Learn how the 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 — faster, on any GPU, with no license required.
- Simulations that took hours now take minutes. RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed.
- Start running code in seconds. Open the browser sandbox or download a single binary. No license server, no IT ticket, no setup.
- A full development environment. GPU-accelerated 2D and 3D plotting, automatic versioning on every save, and a browser IDE you can share with a link.