RunMat
  • Pricing
RunMat
GitHub
GitHub
DownloadSign InTry in Browser
DesktopRuntimeServer
RunMat

Run math blazing fast

GitHubX (Twitter)LinkedIn

Company

  • About
  • Pricing
  • Contact
  • License
  • Privacy

Learn

  • Docs
  • Blog
  • Benchmarks
  • RunMat vs MATLAB Online

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.

/
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

text — Add text at a position in a 2-D or 3-D plot.

text(x,y,txt) adds an annotation at a 2-D position. Include z for a 3-D position, or provide an axes handle first to select the target axes.

Syntax

h = text(x, y, label)
h = text(x, y, label, Name, Value, ...)
h = text(x, y, z, label)
h = text(x, y, z, label, Name, Value, ...)
h = text(ax, x, y, label)
h = text(ax, x, y, z, label)

Inputs

NameTypeRequiredDefaultDescription
xNumericScalarYes—X coordinate.
yNumericScalarYes—Y coordinate.
labelStringScalarYes—Annotation text.
propsAnyVariadic—Name/value style options.
zNumericScalarYes—Z coordinate.
axAxesHandleYes—Target axes handle.

Returns

NameTypeDescription
hNumericScalarHandle to the created text annotation.

Errors

IdentifierWhenMessage
RunMat:text:InvalidArgumentCoordinate, label, axes-target, or name/value text style arguments are invalid.text: invalid argument
RunMat:text:InternalInternal plotting state update fails while creating annotation.text: internal operation failed

How text works

  • Coordinates can use single, double, or any of the eight integer classes.
  • The Position property retains the coordinate class, shape, and exact values. Rendering uses a separate floating-point geometry cache.
  • A two-element Position value is stored with a third coordinate of zero in the same numeric class.
  • The returned graphics handle supports get and set for String, Position, FontWeight, FontAngle, Interpreter, Color, FontSize, and Visible.
  • Typed-integer numeric axes aliases and explicit gpuArray coordinates are RunMat-mode extensions.

Examples

Label a point on a curve

plot(1:5, [2 4 3 5 4]);
h = text(4, 5, "peak");

Add a 3-D annotation

plot3(1:3, 2:4, 5:7);
h = text(2, 3, 6, "sample");

Use integer coordinates

h = text(int64(12), int64(-3), "checkpoint");
position = get(h, "Position")

Expected output:

position = 1×3 int64
    12    -3     0

Using text with coding agents

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

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

FAQ

Are integer positions converted to double?⌄

No. The graphics property keeps native integer storage and exact values. Only the derived coordinates sent to the renderer are converted.

Can text label several points in one call?⌄

Not yet. Each call currently accepts one scalar 2-D or 3-D position; vector coordinates and per-point label arrays remain unsupported.

Can I pass resident coordinates?⌄

Automatically resident coordinates are gathered transparently through their owning provider. Explicit gpuArray coordinates require RunMat mode because the current public compatibility target does not document an interactive GPU form for text.

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 · 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 · textscatter · textscatter3 · triplot · waitbar · wordcloud · xlabel · xlim · xline · xscale · xtickangle · xtickformat · xticklabels · xticks · ylabel · ylim · yline · yscale · ytickangle · ytickformat · yticklabels · yticks · zlim · zoom

Open-source implementation

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

  • View the source for text 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 text works
  • Examples
  • Label a point on a curve
  • Add a 3-D annotation
  • Use integer coordinates
  • Using text with coding agents
  • FAQ
  • Related Plotting functions
  • 2D Charts
  • 3D & Surface
  • Images
  • Axes & Layout
  • Appearance
  • Handle Access
  • Other
  • Open-source implementation
  • About RunMat