Adjust display size of image
truesize( adjusts the display size
such that each image pixel covers one screen pixel.
If you do not specify a figure,
truesize adjusts the display
size of the current figure.
Create a default checkerboard image, which has size 80-by-80 pixels. Display the checkerboard image to fill the full size of the figure window. The image is magnified to fill the window.
c = checkerboard; imshow(c,'InitialMagnification','fit')
Display the checkerboard image so that each image pixel covers one screen pixel.
You can adjust the size of the figure window to arbitrary dimension. The image scales to fit within the figure window.
gcf(default) | figure handle
Figure containing a single image or a single image with a colorbar,
specified as a figure handle. By default,
the current figure, with handle
[mrows ncols]— Screen dimensions
Screen dimensions (in pixels) that the image should occupy, specified as a
2-element numeric row vector. By default,
is equal to the image size, so each image pixel covers one screen