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

imshow — Display images in MATLAB and RunMat.

imshow displays grayscale, binary, and truecolor image data with MATLAB-style defaults. File-input handling and display scaling behavior follow MATLAB semantics.

Syntax

h = imshow(I)
h = imshow(I, [low high])
h = imshow(I, [])

Inputs

NameTypeRequiredDefaultDescription
IAnyYes—Image matrix/array or filename.
IAnyYes—Numeric grayscale image matrix/array.
DisplayRangeNumericArrayYes[]Display limits as [] or [low high].

Returns

NameTypeDescription
hNumericScalarHandle to the image object.

Errors

IdentifierWhenMessage
RunMat:imshow:InvalidArgumentImage input, filename, or display range arguments are malformed or unsupported.imshow: invalid argument
RunMat:imshow:InternalInternal image decoding or render preparation fails unexpectedly.imshow: internal operation failed

How imshow works

  • imshow(I) displays 2-D numeric data with grayscale limits [0, 1], matching MATLAB double-image defaults.
  • imshow(BW) displays logical image data as black and white using [0, 1] limits.
  • imshow(RGB) displays MxNx3 truecolor data directly.
  • In runmat compatibility mode, imshow(RGBA) accepts supported numeric MxNx4 data as a RunMat extension and displays its fourth channel as alpha.
  • imshow(I, [low high]) displays grayscale image data using an explicit display range.
  • imshow(I, []) auto-scales grayscale image data from finite minimum to finite maximum.
  • imshow(filename) reads and decodes an image file, then displays it as truecolor data.

Examples

Display a simple grayscale image

row = 100;
col = 100;
rsm = ones(row, col);
imshow(rsm);

Auto-scale a matrix for display

A = peaks(128);
imshow(A, []);

Display truecolor RGB data

R = ones(64, 64);
G = zeros(64, 64);
B = zeros(64, 64);
RGB = cat(3, R, G, B);
imshow(RGB);

Display an image file

imshow("photo.png");

Rendered imshow example

[X, Y] = meshgrid(linspace(-3, 3, 220), linspace(-2, 2, 150));
field = exp(-0.8*((X-1).^2 + Y.^2)) - 0.7*exp(-((X+1).^2 + (Y-0.4).^2));

imshow(field, []);
title('Autoscaled Grayscale Field');
Expected output:
Autoscaled grayscale test field displayed with MATLAB imshow in RunMat

Compare this result with other chart types in the MATLAB Plot Gallery.

Using imshow with coding agents

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

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

FAQ

What display range does imshow use for doubles?⌄

imshow(I) uses [0, 1] for floating-point grayscale data. Use imshow(I, []) when you want RunMat to scale the visible range from the data minimum to maximum.

Does imshow support uint8 and uint16 image defaults?⌄

Yes. Grayscale uint8 data uses [0, 255], grayscale uint16 data uses [0, 65535], and truecolor data of either class is normalized by the corresponding full-scale value.

How is imshow different from imagesc?⌄

imshow is for image display and uses grayscale or truecolor image defaults. imagesc is for scaled matrix visualization and maps data through the active colormap.

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

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 · quiver3 · 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

Open-source implementation

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

  • View the source for imshow 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 imshow works
  • Examples
  • Display a simple grayscale image
  • Auto-scale a matrix for display
  • Display truecolor RGB data
  • Display an image file
  • Rendered imshow example
  • Using imshow with coding agents
  • FAQ
  • Related Plotting functions
  • 2D Charts
  • 3D & Surface
  • Images
  • Axes & Layout
  • Appearance
  • Handle Access
  • Other
  • Open-source implementation
  • About RunMat