RunMat
GitHub

area — Create filled area plots for cumulative totals, stacked series, and MATLAB area workflows.

area creates filled area plots from vector or matrix-style inputs. In RunMat it returns an area-handle object, supports baseline-based and stacked-series workflows, and uses GPU-backed geometry generation together with the shared plotting object and rendering systems.

How area works in RunMat

  • area(y) uses implicit x-values 1:n, while area(x, y) uses explicit x coordinates.
  • Matrix-style y inputs create stacked area series in the MATLAB style.
  • The returned value is an area-handle object that works with get and set.
  • Baseline and color workflows flow through the shared plotting property model.
  • Stacked-series geometry can be emitted directly from GPU buffers on the happy path.

Options

  • 'BaseValue' sets the baseline used by area filling.
  • Color and display-name workflows are available through the returned handle and the shared plotting property path.

How area runs on the GPU

The direct area path emits filled geometry from GPU data on the happy path.

Baseline semantics, stacked-series behavior, and handle/property workflows remain aligned across GPU and fallback paths.

GPU memory and residency

area preserves GPU residency on the direct path, including stacked-series geometry generation. Fallback rendering still preserves the same visible semantics and handle behavior when a direct GPU path is not available.

Examples

Create a basic filled area plot

x = 0:0.1:1;
area(x, x.^2);

Create stacked area series from a matrix

x = 1:5;
Y = [1 2 1; 2 1 2; 3 2 1; 2 3 2; 1 2 3];
area(x, Y);

Change the baseline and label the series through the handle

x = 0:0.2:2;
h = area(x, sin(x) + 2);
set(h, 'BaseValue', 1, 'DisplayName', 'offset area');
legend;

These functions work well alongside area. Each page has runnable examples you can try in the browser.

quiver, bar, plot, legend, get, set

Open-source implementation

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

About RunMat

RunMat is an open-source runtime that executes MATLAB-syntax code — faster, on any GPU, with no license required.

  • Simulations that took hours now take minutes. RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed.
  • Start running code in seconds. Open the browser sandbox or download a single binary. No license server, no IT ticket, no setup.
  • A full development environment. GPU-accelerated 2D and 3D plotting, automatic versioning on every save, and a browser IDE you can share with a link.

Getting started · Benchmarks · Pricing

Try RunMat — free, no sign-up

Start running MATLAB code immediately in your browser.