Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

imgcf

Get current figure containing image

Syntax

hfig = imgcf

Description

hfig = imgcf returns the current figure that contains an image. The figure may be a regular figure window that contains at least one image or an Image Tool window.

If none of the figures currently open contains an image, imgcf creates a new figure.

Note

imgcf can be useful in getting the figure used by the Image Tool. You cannot retrieve the tool figure using gcf.

Examples

imtool rice.png
cmap = copper(256);
set(imgcf,'Colormap',cmap)

See also

gca, gcf, imgca, imhandles

Introduced before R2006a

Was this topic helpful?