Documentation Center

  • Trial Software
  • Product Updates

subimage

Display multiple images in single figure

Syntax

subimage(X, map)
subimage(I)
subimage(BW)
subimage(RGB)
subimage(x, y...)
h = subimage(...)

Description

You can use subimage in conjunction with subplot to create figures with multiple images, even if the images have different colormaps. subimage works by converting images to truecolor for display purposes, thus avoiding colormap conflicts.

subimage(X, map) displays the indexed image X with colormap map in the current axes.

subimage(I) displays the intensity image I in the current axes.

subimage(BW) displays the binary image BW in the current axes.

subimage(RGB) displays the truecolor image RGB in the current axes.

subimage(x, y...) displays an image using a nondefault spatial coordinate system.

h = subimage(...) returns a handle to an image object.

Class Support

The input image can be of class logical, uint8, uint16, or double.

Examples

load trees
[X2,map2] = imread('forest.tif');
subplot(1,2,1), subimage(X,map)
subplot(1,2,2), subimage(X2,map2)

See Also

|

Was this topic helpful?