What does scatter3 do?
scatter3(x, y, z) plots points in 3-D space using MATLAB-compatible defaults. Each input must
contain the same number of elements; row and column vectors are both accepted.
Behaviour highlights
- Inputs may be real doubles, single-precision tensors, or gathered gpuArray values. Complex data currently raises an error matching MATLAB.
- Points inherit MATLAB’s default styling: blue markers with mild transparency. Future work will add size/color arguments, but existing scripts using the basic call form work today.
- Fusion graphs terminate at
scatter3, and gpuArray inputs are gathered so the renderer can access dense host memory or a shared WebGPU buffer depending on the build.
Examples
t = linspace(0, 4*pi, 200);
scatter3(cos(t), sin(t), t);
GPU residency
scatter3 gathers GPU tensors before plotting today. The new shared-device renderer keeps future
implementations zero-copy. Until that lands, expect the builtin to behave like MATLAB: data moves
to the host, rendering completes, and execution returns immediately.