FullScreen of a Figure with no Borders and Toolbar

43 Ansichten (letzte 30 Tage)
Fed
Fed am 27 Feb. 2015
Kommentiert: lukas Fonk am 22 Aug. 2023
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!

Akzeptierte Antwort

Geoff Hayes
Geoff Hayes am 1 Mär. 2015
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!
  5 Kommentare
feng hongchuan
feng hongchuan am 9 Nov. 2022
There are still two narrow strips at left and right sides.
lukas Fonk
lukas Fonk am 22 Aug. 2023
If you have narrow black stripes use imshow()

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Steven Lord
Steven Lord am 27 Mär. 2018
As of release R2018a, you can set the WindowState property of a figure to maximize the figure programmatically or display it fullscreen. If you set the MenuBar and ToolBar properties to 'none' as well the figure will have no borders, no menus, and no toolbar.
figure('WindowState', 'fullscreen', ...
'MenuBar', 'none', ...
'ToolBar', 'none')
  3 Kommentare
Michael Reilly
Michael Reilly am 23 Sep. 2018
I believe the program you are looking for is Psychtoolbox. It's a third party add-on toolbox for MATLAB. Link can be found here: http://psychtoolbox.org/
KAE
KAE am 11 Jul. 2019
You may find undecoratefig useful.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Graphics Object Properties finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by