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

isgraphics — Test graphics-handle validity, optionally selecting a graphics type.

isgraphics queries the live RunMat graphics registry and returns a host logical result. Exact graphics receiver objects are authenticated by their retained registry lease, not by their class-name text or a reusable numeric identifier. Numeric aliases use the existing graphics handle encoding; zero denotes the root. Invalid, retired, and non-graphics candidates return false. A second scalar text argument filters by the implemented graphics type.

Syntax

tf = isgraphics(h)
tf = isgraphics(h, type)

Inputs

h
Type
Any
Required
Yes
Default
—
Description
Graphics receiver object, numeric handle alias, or another value to test.
type
Type
StringScalar
Required
Yes
Default
—
Description
Case-insensitive graphics type name as scalar string or character row; unknown names match nothing.
NameTypeRequiredDefaultDescription
hAnyYes—Graphics receiver object, numeric handle alias, or another value to test.
typeStringScalarYes—Case-insensitive graphics type name as scalar string or character row; unknown names match nothing.

Returns

tf
Type
LogicalArray
Description
Host logical validity mask for numeric handle arrays, or a scalar logical for other candidates.
NameTypeDescription
tfLogicalArrayHost logical validity mask for numeric handle arrays, or a scalar logical for other candidates.

Errors

RunMat:isgraphics:InvalidArgument
When
The input count is not one or two, or the optional type is not host scalar text.
Message
isgraphics: invalid argument
RunMat:isgraphics:TooManyOutputs
When
More than one output is requested.
Message
isgraphics: too many output arguments
IdentifierWhenMessage
RunMat:isgraphics:InvalidArgumentThe input count is not one or two, or the optional type is not host scalar text.isgraphics: invalid argument
RunMat:isgraphics:TooManyOutputsMore than one output is requested.isgraphics: too many output arguments

Accepted forms and shapes

isgraphics(h) accepts any candidate value. Host real numeric tensors, including native single and all integer storage classes, produce logical arrays with the original full shape, including rank-zero, rank-one and empty dimensions. Numeric scalar carriers return scalar logical.

Other host values, including sparse matrices, logical arrays, complex values, strings, cells and non-graphics objects, produce scalar false rather than an elementwise mask. This is the bounded current RunMat representation, not a claim of complete MATLAB object-array parity.

A valid graphics receiver object returns scalar true while its exact lease is registered; closing, clearing, or replacing its registry owner makes the old object false even if a numeric identifier is reused.

isgraphics(h,type) accepts a scalar string, one-element string array or character row. Type names are trimmed and case-insensitive; an unknown or empty name matches nothing. Invalid selector representation is an argument error before predicate evaluation.

Implemented selectors include root, figure, axes, ruler, xaxis, yaxis, legend, text, line, animatedline, scatter, bar, stem, errorbar, stairs, quiver, image, heatmap, histogram, histogram2, binscatter, area, surface, functionsurface, functioncontour, patch, contour, constantline, textscatter, wordcloud, colorbar and stackedplot. Both 2-D and 3-D lines/scatters share their typed family. Existing pie children match patch; the public pie selector remains unrecognized.

Integer aliases and compatibility

Interpreting typed integers as encoded graphics aliases is a declared RunMat-only extension. The original native integer value is read without a floating mirror; only nonnegative integers exactly representable in the graphics encoding are candidates. Negative and nonrepresentable integers return false.

With RunMat extensions disabled, integer scalars return scalar false and integer tensors return same-shaped false. No extension exception is raised by this predicate. Floating numeric aliases retain the existing RunMat registry semantics.

Placement, authority and remaining limits

Resident tensors are not graphics objects: only their shape metadata is inspected, with no provider selection, download, kernel, input retirement or replay. The host result is a same-shaped false logical array, except a one-element resident input publishes scalar false. The operation is a fusion boundary, not an accelerated reduction.

The Runtime binding retains the actual selected context and borrowed argument owner, validates output demand before work, and fences cancellation and finite-allocation authority through the existing graphics admission owner. Finite mask, selector and registry snapshot ownership remains incomplete: Managed calls fail closed rather than allocating unowned storage.

The predicate observes mutable graphics state and therefore is not a pure constant-foldable query. It creates no figure or renderer by itself. Portable root/invalid examples need no display; examples that construct real charts require an actual graphics host. NativeAndWasm denotes source/link portability, not fresh browser-cooperation or desktop-presentation qualification.

Examples

Test root and invalid numeric aliases without opening a figure

tf = isgraphics([0 NaN -1]);

Retain empty dimensions in a numeric candidate array

h = zeros(2,0,3); tf = isgraphics(h);

Recognize live graphics and reject retired aliases

f = figure(); h = plot(1:3); live = isgraphics(h); close(f); retired = isgraphics(h); replacement = figure();

Read integer aliases exactly under RunMat extension policy

h = int64([0 -1]); tf = isgraphics(h);

Match graphics kinds with scalar text

f = figure(); h = plot(1:3); ax = gca; a = isgraphics(h,'line'); b = isgraphics(ax,'AXES'); c = isgraphics(h,'figure');

Reject a nontext type selector

isgraphics(0,42);

Using isgraphics with coding agents

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

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

FAQ

Does this predicate create or revive graphics objects?⌄

No. It observes the current registry. An invalid placeholder or retired receiver stays invalid; a newly created object must supply its own live authority.

Are resident numeric values downloaded to inspect potential handles?⌄

No. Resident inputs return a host false mask using only shape metadata; no acceleration provider is invoked.

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

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

Source you can read

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

  • View the source for isgraphics 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
  • Accepted forms and shapes
  • Integer aliases and compatibility
  • Placement, authority and remaining limits
  • Examples
  • Test root and invalid numeric aliases without opening a figure
  • Retain empty dimensions in a numeric candidate array
  • Recognize live graphics and reject retired aliases
  • Read integer aliases exactly under RunMat extension policy
  • Match graphics kinds with scalar text
  • Reject a nontext type selector
  • Using isgraphics with coding agents
  • FAQ
  • Related Plotting functions
  • 2D Charts
  • 3D & Surface
  • Images
  • Axes & Layout
  • Appearance
  • Handle Access
  • Other
  • Source you can read
  • About RunMat