openfig — Open figures saved in RunMat FIG files.

openfig(filename) loads a RunMat FIG scene file and returns the imported figure handle or a row vector of handles.

Syntax

fig = openfig(filename)
fig = openfig(filename, copies)
fig = openfig(filename, visibility)
fig = openfig(filename, copies, visibility)

Inputs

NameTypeRequiredDefaultDescription
argsAnyVariadicMATLAB-compatible figure persistence arguments.

Returns

NameTypeDescription
figNumericArrayFigure handle or array of figure handles.

Errors

IdentifierWhenMessage
RunMat:figurePersistence:InvalidArgumentArguments are missing, malformed, or incompatible with the requested figure persistence operation.figure persistence: invalid argument
RunMat:figurePersistence:UnsupportedFormatThe requested save/load format is recognized but not supported by RunMat's active plotting exporter.figure persistence: unsupported format
RunMat:figurePersistence:IoFailureThe target file cannot be read, written, flushed, synced, or atomically replaced.figure persistence: file I/O failed

How openfig works

  • The .fig extension is appended when the filename has no extension.
  • openfig(filename, 'new') imports a new copy of the saved scene. reuse mode is rejected until RunMat tracks figure-file reuse relationships.
  • openfig(..., 'visible') and openfig(..., 'invisible') override the loaded figure visibility.

Does RunMat run openfig on the GPU?

No numeric GPU kernel is launched.

Loaded figure content can later render through the normal plotting renderer.

GPU memory and residency

openfig returns host graphics handles and creates plotting state in the runtime registry.

Example

Open an invisible figure in visible state

plot(1:5);
set(gcf, "Visible", "off");
savefig("hidden_plot.fig");
fig = openfig("hidden_plot.fig", "visible");

Using openfig with coding agents

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

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

Open-source implementation

Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how openfig is executed, line by line, in Rust.

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.