How can I remove the grey borders from the IMSHOW plot in MATLAB 7.4 (R2007a) ?
24 views (last 30 days)
Show older comments
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.
Accepted Answer
MathWorks Support Team
on 27 Jun 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
0 Comments
More Answers (0)
See Also
Categories
Find more on Display Image in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!