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

Run math blazing fast

GitHubX (Twitter)LinkedIn

Company

  • About
  • Pricing
  • Contact

Explore

  • RunMat for academia
  • RunMat vs MATLAB Online
  • Benchmarks

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.

LicensePrivacy
/
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

textscatter — Create a 2-D text scatter chart from x/y coordinates and text labels.

textscatter(x,y,str) creates a text scatter chart with labels from str at matching x/y coordinates. textscatter(xy,str) accepts an N-by-2 coordinate matrix. The returned handle provides chart data and display properties.

Syntax

ts = textscatter(x, y, str)
ts = textscatter(xy, str)
ts = textscatter(ax, ...)
ts = textscatter(..., Name, Value)

Inputs

NameTypeRequiredDefaultDescription
xNumericArrayYes—X coordinates.
yNumericArrayYes—Y coordinates.
strAnyYes—String vector or cell array of character vectors.
xyNumericArrayYes—N-by-2 coordinate matrix.
propsAnyVariadic—Name/value TextScatter properties.

Returns

NameTypeDescription
tsNumericScalarHandle to the TextScatter chart object.

Errors

IdentifierWhenMessage
RunMat:textscatter:InvalidArgumentCoordinates, text labels, axes target, or TextScatter property values are invalid.textscatter: invalid argument
RunMat:textscatter:InternalInternal plotting state update fails while creating or mutating TextScatter.textscatter: internal operation failed

How textscatter works

  • x, y, and str must have equal element counts.
  • xy must be an N-by-2 matrix whose first and second columns provide x and y coordinates.
  • Coordinates can use single, double, or any of the eight integer classes. XData and YData retain their native class, shape, and exact values.
  • str can be a string scalar, string array, character row, character matrix, or cell array of text scalars.
  • The axes-target form textscatter(ax,...) renders into the supplied axes handle.
  • TextDensityPercentage controls how many labels are visible; 0 hides all text labels and 100 shows all labels and suppresses marker creation.
  • MaxTextLength truncates long labels and adds ... at the truncation point.
  • MarkerColor accepts auto, none, or an RGB color. ColorData accepts an RGB triplet or N-by-3 RGB matrix for text colors.
  • get supports Type, Parent, Children, TextData, XData, YData, ZData, TextDensityPercentage, MaxTextLength, MarkerColor, MarkerSize, ColorData, Colors, Visible, DisplayName, and Tag; 2-D charts report empty ZData.
  • set supports TextData, XData, YData, TextDensityPercentage, MaxTextLength, MarkerColor, MarkerSize, ColorData, Colors, Visible, Color, FontSize, FontWeight, FontAngle, and Interpreter. ZData mutation is reserved for textscatter3 charts.
  • Categorical ColorData, datasource properties, callbacks, app data, and interactive data-tip template objects are not implemented yet and raise explicit unsupported-property errors.
  • Typed-integer numeric axes aliases and explicit gpuArray inputs are RunMat-mode extensions.

Examples

Create a 2-D text scatter chart

x = [1 2 3];
y = [4 5 6];
words = ["one" "two" "three"];
ts = textscatter(x, y, words);

Use an N-by-2 coordinate matrix

xy = [1 4; 2 5; 3 6];
textscatter(xy, ["one" "two" "three"]);

Limit label length and color each label

xy = [1 1; 2 2; 3 3];
colors = [1 0 0; 0 1 0; 0 0 1];
ts = textscatter(xy, ["alphabet" "betatron" "gamma"], 'MaxTextLength', 5, 'ColorData', colors);
get(ts, 'TextData')

Using textscatter with coding agents

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

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

FAQ

Does textscatter return individual text handles?⌄

No. RunMat returns a first-class textscatter chart handle. The chart owns the text annotations and marker plot internally, so chart data and display properties can be queried and updated through get and set.

How are markers handled?⌄

When TextDensityPercentage is below 100 and MarkerColor is not none, RunMat creates an internal scatter marker plot. At 100 percent density, markers are suppressed to match MATLAB behavior.

Can textscatter preserve gpuArray residency?⌄

The chart and its annotations are host graphics objects. Automatically resident inputs are gathered transparently through their owning provider. Explicit gpuArray inputs require RunMat mode.

Does get(ts,'XData') preserve integer values?⌄

Yes. Coordinate properties use authoritative native storage, including int64 and uint64 values outside the exact double range. Renderer geometry is a separate derived cache.

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 · text · 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 textscatter is executed, line by line, in Rust.

  • View the source for textscatter 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 textscatter works
  • Examples
  • Create a 2-D text scatter chart
  • Use an N-by-2 coordinate matrix
  • Limit label length and color each label
  • Using textscatter with coding agents
  • FAQ
  • Related Plotting functions
  • 2D Charts
  • 3D & Surface
  • Images
  • Axes & Layout
  • Appearance
  • Handle Access
  • Other
  • Open-source implementation
  • About RunMat