How can I remove the grey borders from the IMSHOW plot in MATLAB 7.4 (R2007a) ?

7 vues (au cours des 30 derniers jours)
When I display an image using IMSHOW I get grey borders. For my application I want to remove the borders such that the figure window should only display the image.

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 27 Juin 2009
You can do this using the following set of commands:
imshow('board.tif')
This could be implemented as follows:
set(gca,'units','pixels') % set the axes units to pixels
x = get(gca,'position') % get the position of the axes
set(gcf,'units','pixels') % set the figure units to pixels
y = get(gcf,'position') % get the figure position
set(gcf,'position',[y(1) y(2) x(3) x(4)])% set the position of the figure to the length and width of the axes
set(gca,'units','normalized','position',[0 0 1 1]) % set the axes units to pixels

Plus de réponses (0)

Catégories

En savoir plus sur Display Image dans Help Center et File Exchange

Produits


Version

R2007a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by