RunMat
GitHub

axis — Control axis limits, aspect behavior, and automatic fitting with MATLAB axis semantics.

axis is the compact plotting command for changing axes limits and aspect behavior. In RunMat it operates on the active axes state, so it is naturally used after plotting calls or within a selected subplot to reproduce MATLAB axis workflows such as axis([xmin xmax ymin ymax]), axis equal, axis auto, and axis tight.

How axis works in RunMat

  • Passing a four-element numeric vector sets [xmin xmax ymin ymax] directly.
  • axis equal enables equal aspect behavior on the current axes.
  • axis auto clears explicit limits and returns to automatic fitting.
  • axis tight uses data-driven fitting behavior while leaving figure-local plot contents unchanged.
  • Axis settings are subplot-local because they act on the active axes state.

Examples

Set explicit x and y limits

plot(0:0.1:10, sin(0:0.1:10));
axis([0 10 -1 1]);

Force equal axis scaling

t = linspace(0, 2*pi, 200);
plot(cos(t), sin(t));
axis equal;

Return to automatic fitting inside a subplot

subplot(1, 2, 1);
plot(1:5, [1 4 2 5 3]);
axis tight;
subplot(1, 2, 2);
plot(1:5, [5 4 3 2 1]);
axis auto;

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

grid, box, subplot, plot

Open-source implementation

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