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.2, Nov 26, 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
    • scatterplot

scatterplot — Plot complex samples as constellation points.

scatterplot(x) plots the real and imaginary components of complex samples against each other. Optional decimation, zero-based offset, marker style, and existing scatter figure follow the Communications Toolbox call forms.

Syntax

h = scatterplot(x)
h = scatterplot(x, n)
h = scatterplot(x, n, offset)
h = scatterplot(x, n, offset, marker)
h = scatterplot(x, n, offset, marker, scatfig)

Inputs

x
Type
NumericArray
Required
Yes
Description
Complex-baseband samples. Real inputs are plotted with zero imaginary part.
x
Type
NumericArray
Required
Yes
Description
Complex-baseband samples.
n
Type
IntegerScalar
Required
Yes
Description
Positive decimation factor; every n-th sample is plotted.
offset
Type
IntegerScalar
Required
Yes
Description
Zero-based sample offset before decimation.
n
Type
IntegerScalar
Required
Yes
Description
Positive decimation factor.
marker
Type
StyleSpec
Required
Yes
Description
Marker LineSpec forwarded to scatter.
scatfig
Type
NumericScalar
Required
Yes
Description
Existing figure handle used for the scatter plot.
NameTypeRequiredDefaultDescription
xNumericArrayYes—Complex-baseband samples. Real inputs are plotted with zero imaginary part.
xNumericArrayYes—Complex-baseband samples.
nIntegerScalarYes—Positive decimation factor; every n-th sample is plotted.
offsetIntegerScalarYes—Zero-based sample offset before decimation.
nIntegerScalarYes—Positive decimation factor.
markerStyleSpecYes—Marker LineSpec forwarded to scatter.
scatfigNumericScalarYes—Existing figure handle used for the scatter plot.

Returns

h
Type
NumericScalar
Description
Figure/graphics handle returned by the underlying scatter plot.
NameTypeDescription
hNumericScalarFigure/graphics handle returned by the underlying scatter plot.

Errors

RunMat:scatterplot:InvalidArgument
When
The input samples, decimation factor, offset, marker, or existing Figure handle is invalid.
Message
scatterplot: invalid argument
RunMat:scatterplot:PlotFailed
When
The underlying scatter plot cannot be rendered.
Message
scatterplot: plot operation failed
IdentifierWhenMessage
RunMat:scatterplot:InvalidArgumentThe input samples, decimation factor, offset, marker, or existing Figure handle is invalid.scatterplot: invalid argument
RunMat:scatterplot:PlotFailedThe underlying scatter plot cannot be rendered.scatterplot: plot operation failed

Call forms and figure state

scatterplot(x) draws every sample with a constellation marker. scatterplot(x,n) draws every nth sample. The offset form starts at zero-based offset, equivalent to x(offset+1:n:end). Marker is a LineSpec forwarded to scatter.

The fifth argument scatfig is an existing Figure handle, not an axes handle. The plot uses equal x/y scaling and grid lines. The returned handle is the underlying scatter graphics handle. Plotting changes local figure state and may invoke figure observers.

The MATLAB-compatible sample classes are single and double, with double integer-valued n and offset. RunMat mode also admits real fixed-width sample values when exactly representable in binary64 and typed-integer decimation controls. Strict MATLAB mode rejects those extensions before plotting.

GPU and execution

scatterplot is a rendering sink and a fusion boundary. For a supported non-decimated GPU input, the provider can expose resident real/imaginary buffers to the shared GPU scatter renderer. Decimation or unsupported splitting gathers once, then uses the same scatter and axes behavior.

Rendering requires a local user-interface context and is not transferable as a remote worker graphics handle. Numeric inputs are validated before figure selection; provider readback or rendering may suspend.

Examples

Plot four QPSK symbols

x = [1+1i;-1+1i;-1-1i;1-1i]; h = scatterplot(x);

Plot every fourth sample with a marker

rx = randn(1000,1)+1i*randn(1000,1); h = scatterplot(rx,4,0,'gx');

Add points to an existing scatter figure

h1 = scatterplot([1+1i;1-1i]); h2 = scatterplot([-1+1i;-1-1i],1,0,'b.',gcf());

Using scatterplot with coding agents

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

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

FAQ

How does scatterplot differ from scatter?⌄

scatterplot takes one complex sample array and derives its real and imaginary coordinates; scatter takes separate x and y coordinates. scatterplot also supports Communications Toolbox decimation and offset controls.

Does scatterplot support gpuArray inputs?⌄

Yes. A supported no-decimation input can be rendered from provider-resident real and imaginary buffers. Decimated or unsupported inputs gather once before rendering.

Related guides

  • Styling plots and axes
  • GPU plotting and residency

Source you can read

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

  • View the source for scatterplot 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
  • Call forms and figure state
  • GPU and execution
  • Examples
  • Plot four QPSK symbols
  • Plot every fourth sample with a marker
  • Add points to an existing scatter figure
  • Using scatterplot with coding agents
  • FAQ
  • Related guides
  • Source you can read
  • About RunMat