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

quiver3 — Visualize 3-D vector fields with MATLAB-compatible quiver3 plots.

quiver3 draws arrows anchored at 3-D coordinates and returns a graphics handle. It supports implicit grid coordinates from Z, explicit X, Y, and Z coordinates, axes targeting, numeric scale factors, line-style shorthand, and name/value styling.

Syntax

h = quiver3(Z, U, V, W)
h = quiver3(X, Y, Z, U, V, W)
h = quiver3(Z, U, V, W, scaleOrStyleOrNameValue...)
h = quiver3(X, Y, Z, U, V, W, scaleOrStyleOrNameValue...)
h = quiver3(ax, Z, U, V, W)
h = quiver3(ax, X, Y, Z, U, V, W)
h = quiver3(ax, Z, U, V, W, scaleOrStyleOrNameValue...)
h = quiver3(ax, X, Y, Z, U, V, W, scaleOrStyleOrNameValue...)

Inputs

NameTypeRequiredDefaultDescription
ZNumericArrayYes—Arrow base z-coordinates.
UNumericArrayYes—Vector field x-components.
VNumericArrayYes—Vector field y-components.
WNumericArrayYes—Vector field z-components.
XNumericArrayYes—Arrow base x-coordinates.
YNumericArrayYes—Arrow base y-coordinates.
argsAnyVariadic—Optional scale, line-style shorthand, or name/value style arguments.
axAxesHandleYes—Target axes handle.

Returns

NameTypeDescription
hNumericScalarHandle to the rendered 3-D quiver plot.

Errors

IdentifierWhenMessage
RunMat:quiver3:InvalidArgumentInput data, axes targeting, scale, or style arguments are invalid.quiver3: invalid argument
RunMat:quiver3:InternalInternal quiver3 construction or rendering fails unexpectedly.quiver3: internal operation failed

How quiver3 works

  • quiver3(Z, U, V, W) builds default X/Y grid coordinates from the shape of Z.
  • quiver3(X, Y, Z, U, V, W) accepts matching coordinate arrays or meshgrid-style X/Y vectors for matrix vector fields.
  • The returned graphics handle exposes XData, YData, ZData, UData, VData, WData, Color, LineWidth, AutoScaleFactor, MaxHeadSize, Parent, Children, and Type through get and style updates through set.
  • 3-D arrow geometry is stored in the shared quiver plot primitive, while native X/Y/Z/U/V/W source storage remains authoritative so property access and replay/export preserve integer class, shape, and exact values.
  • Changing scale, head size, color, or data properties invalidates cached quiver geometry before the next render.
  • Integer coordinate and vector inputs retain exact native storage, including 64-bit values beyond binary64's exact range; materialization occurs only at the floating 3-D renderer boundary.

Options

  • A numeric argument after the vector data controls the arrow scale factor.
  • 'AutoScaleFactor' / 'Scale' controls arrow scaling.
  • 'MaxHeadSize' / 'HeadSize' controls the size of arrowheads.
  • Line-style color and width workflows use the same parser as other line-like plotting builtins.

Does RunMat run quiver3 on the GPU?

Host and GPU-fallback paths produce the same handle semantics and replay/export data.

A future direct WGPU path should mirror the existing 2-D quiver GPU packer with Z/W coordinate buffers.

GPU memory and residency

quiver3 is currently a gather-immediate plotting sink. GPU-resident inputs are materialized once before building 3-D arrow geometry; direct provider-backed geometry emission is intentionally left to the queued GPU fast-path audit.

Examples

Create a 3-D vector field from Z and vector components

[X, Y] = meshgrid(-2:1:2, -2:1:2);
Z = X.^2 - Y.^2;
U = -Y;
V = X;
W = ones(size(Z));
quiver3(Z, U, V, W);

Provide explicit coordinates and style the arrows

[X, Y, Z] = meshgrid(-1:1, -1:1, 0:1);
U = -Y;
V = X;
W = 0.5 * ones(size(Z));
h = quiver3(X, Y, Z, U, V, W, 1.5, 'r');
set(h, 'DisplayName', 'flow', 'MaxHeadSize', 0.2);
view(45, 30);

Target a specific axes

ax = axes;
quiver3(ax, 1:3, 1:3, 1:3, [1 0 -1], [0 1 0], [0 0 1]);

Using quiver3 with coding agents

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

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

FAQ

How do I control arrow lengths in a quiver3 plot?⌄

Pass a numeric scale after the vector data or set the 'AutoScaleFactor' property.

h = quiver3(X, Y, Z, U, V, W, 0.75);
set(h, 'AutoScaleFactor', 1.5);
Can I inspect the 3-D vector data after plotting?⌄

Yes. Use get(h, 'XData'), get(h, 'YData'), get(h, 'ZData'), get(h, 'UData'), get(h, 'VData'), and get(h, 'WData') on the returned handle.

Does quiver3 keep GPU data resident?⌄

Not yet on the direct geometry path. RunMat gathers GPU inputs once and preserves the same plotting and handle semantics; direct WGPU packing for 3-D arrows is tracked by the eval-loop GPU fast-path audit.

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

More plotting resources

  • Choosing the right plot type
  • Styling plots and axes
  • Plot replay and export

Open-source implementation

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

  • View the source for quiver3 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 quiver3 works
  • Options
  • Does RunMat run quiver3 on the GPU?
  • GPU memory and residency
  • Examples
  • Create a 3-D vector field from Z and vector components
  • Provide explicit coordinates and style the arrows
  • Target a specific axes
  • Using quiver3 with coding agents
  • FAQ
  • Related Plotting functions
  • 2D Charts
  • 3D & Surface
  • Images
  • Axes & Layout
  • Appearance
  • Handle Access
  • Other
  • More plotting resources
  • Open-source implementation
  • About RunMat