How to put a figure window in the center of the screen?
152 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Merse Gaspar
am 27 Mai 2023
Kommentiert: Merse Gaspar
am 28 Mai 2023
Is it possible to put a figure (for example a GUI window) in the center of the screen? How to get screen size in pixels, or how to measure position not from the bottom, but from the top?
0 Kommentare
Akzeptierte Antwort
Atsushi Ueno
am 27 Mai 2023
width = 640; height = 480;
Pix_SS = get(0,'screensize')
[(Pix_SS(3)-width)/2 (Pix_SS(4)-height)/2 width height]
figure('Position', [(Pix_SS(3)-width)/2 (Pix_SS(4)-height)/2 width height])
3 Kommentare
Siehe auch
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!