MATLAB: FullScreen of a Figure with no Borders and Toolbar

figurefullscreenno borders

Hello, I would like to display a full-screen image using figure, with no borders around, no Windows toolbar, nothing except the image, which changes every loop. Is that possible? I have problems using screen function with my MacBookAir, therefore I am obliged to use simply figure to implement the task. Ay suggestions will be appreciated. Thanks!

Best Answer

hFig = figure('units','normalized','outerposition',[0 0 1 1]);
So if you have displayed your image using either imshow or image as
image(myimg)
then you can change the size as
% get the figure and axes handles
hFig = gcf;
hAx = gca;
% set the figure to full screen
set(hFig,'units','normalized','outerposition',[0 0 1 1]);
% set the axes to full screen
set(hAx,'Unit','normalized','Position',[0 0 1 1]);
% hide the toolbar
set(hFig,'menubar','none')
% to hide the title
set(hFig,'NumberTitle','off');
Try the above and see what happens!