RunMat
GitHub

imagesc — Display scaled matrix images for heatmaps, colormaps, and MATLAB imagesc style visualization.

imagesc is the scaled-image member of the modern image family. In RunMat it is ideal for matrix heatmaps and value-driven raster visualization because the matrix is interpreted through colormap and color-limit semantics rather than through direct truecolor object semantics. The returned handle is still an image-handle object, but the visual meaning differs from image because imagesc is specifically about scaled matrix visualization.

How imagesc works in RunMat

  • imagesc(C) displays a matrix using implicit axes and scaled color mapping.
  • imagesc(X, Y, C) places the scaled image explicitly on the axes using the provided coordinate extents.
  • Unlike image, imagesc is fundamentally about colormap-driven value visualization rather than direct indexed/truecolor graphics-object placement.
  • The returned value is still an image-handle object in the shared plotting handle system.
  • imagesc works naturally with colormap, colorbar, caxis, and subplot-local axes state.

Examples

Display a matrix as a heatmap-style scaled image

[X, Y] = meshgrid(linspace(-3, 3, 60), linspace(-3, 3, 60));
A = sin(X) .* cos(Y);
imagesc(A);
colorbar;

Place a scaled image on explicit axes

A = reshape(1:100, 10, 10);
imagesc([-5 5], [0 1], A);
colormap('parula');

Use subplot-local color workflows

[X, Y] = meshgrid(linspace(-3, 3, 40), linspace(-3, 3, 40));
Z = sin(X) .* cos(Y);
subplot(1, 2, 1);
imagesc(Z);
colormap('jet');
colorbar;
subplot(1, 2, 2);
imagesc(magic(20));
colormap('gray');

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

image, colorbar, colormap, axis

Open-source implementation

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