RunMat
GitHub

stairs — Render MATLAB-compatible stairs (step) plots.

stairs(x, y) draws a stairstep graph of the data in y versus the points in x, matching MATLAB's default styling. Each successive pair of points generates a horizontal segment followed by a vertical jump.

How stairs works in RunMat

  • Inputs must be real vectors of matching, non-zero length.
  • With single precision gpuArrays and the shared WebGPU renderer active, RunMat packs the vertex buffer directly on the GPU. Other data falls back to the CPU path automatically.
  • Like MATLAB, repeated calls append to the current axes when hold on is enabled.

Example

t = 0:5;
stairs(t, cumsum(rand(size(t))))

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

bar, contour, contourf, hist, mesh, meshc, plot, scatter, scatter3, surf, surfc

Open-source implementation

Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how stairs 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.