imshow
Displays an image file in a figure.
Syntax
h = imshow(input)
h = imshow(input, property, value, ...)
h = imshow(parent, ...)
h = imshow(input)
Inputs
- input
- Path of the file that is displayed in a figure or matrix.
- property, value
-
- 'position'
- Position and size of h. Value is specified as a vector of the form: [left top width height].
- 'units'
- Specifies units of measurement. Valid values are 'pixels'(default) and 'normalized'.
- parent
- Handle of a container object, which could be an axis, figure, uipanel, or uitab.
Outputs
- h
- Handle of the image shown.
Examples
close all;
h = imshow('img1.PNG');
close all;
axes;
h = imshow(gca, 'img1.PNG');
hold('on');
plot(1:100,cos(1:100));
Comments
If the parent is an axis element then the image will be drawn in the grid area, the Y axis will be reversed and the axes method will be set to 'equal' by default.