RunMat
GitHub

get — Get graphics object properties in MATLAB and RunMat.

get reads properties from graphics handles such as figures, axes, legends, and plot objects. Property names, return forms, and handle behavior follow MATLAB semantics across RunMat graphics objects.

Syntax

value = get(h)
value = get(h, property)

Inputs

NameTypeRequiredDefaultDescription
hAnyYesGraphics handle (figure, axes, plot object, text, legend, etc.).
propertyPropertyNameNoProperty name to query (case-insensitive).

Returns

NameTypeDescription
valueAnyProperty value or a struct of all readable properties.

Errors

IdentifierWhenMessage
RunMat:get:InvalidArgumentHandle value or property selector is missing/invalid, or property lookup fails validation.get: invalid argument
RunMat:get:InternalInternal handle/property retrieval fails unexpectedly.get: internal operation failed

How get works

  • get(h) returns a struct of known properties for the handle h.
  • get(h, 'PropertyName') returns a single property value.
  • The supported property set depends on the handle family: figure, axes, text, legend, and child plot objects each expose different fields.
  • RunMat uses get to surface subplot-local state such as limits, scale modes, legend visibility, and text metadata.
  • The handle families covered by get now extend across the major plot families rather than just the most recently added plotting builtins.

Examples

Inspect the full property struct for a line handle

h = plot(1:5, [1 4 2 5 3]);
props = get(h);

Read an axes-local property

ax = subplot(1, 2, 2);
semilogx(logspace(0, 2, 50), logspace(0, 2, 50));
set(ax, 'FontSize', 12);
get(ax, 'FontSize')

Expected output:

ans =
    12

Inspect a legend handle after creation

plot(1:5, 1:5);
lg = legend('series');
get(lg, 'Orientation')

Using get with coding agents

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

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

FAQ

How do I see all available properties on a handle?

Call get(h) with no property name. It returns a struct containing every known property for that handle type. This is the fastest way to discover what's queryable on a line, axes, legend, or text object.

Can I query properties on axes handles, not just plot objects?

Yes. get(gca, 'XScale') reads the x-axis scale mode, get(gca, 'View') reads the camera angle, get(gca, 'FontSize') reads the axes tick-label font size, and so on. Axes handles, legend handles, text handles, and plot-child handles all go through the same get interface.

What happens if I query a property that doesn't exist?

RunMat raises a plotting error rather than returning empty or silently succeeding. If you're unsure whether a property exists, call get(h) first to inspect the full property struct.

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

Other

cla · clf · figure · fill3 · hold · patch · polarplot · print · suptitle · xline · yline

More plotting resources

Open-source implementation

Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how get 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.