How to center a figure in live script output
Ältere Kommentare anzeigen

On the right, you see the output panel of the live script. When I plot a figure, output is always left-aligned. How can I center the figure?
1 Kommentar
Varol Aydemir
am 11 Jul. 2018
Antworten (3)
Sam Raymond
am 15 Feb. 2020
1 Stimme
If you use the Position option in the Figure defintion you can use the width and heights to push the figure into the center
figure('Position',[1000 100 1500 1000]);
If you play around with the values you should get the images in the center.
Brian Cianciola
am 10 Jul. 2018
Bearbeitet: Brian Cianciola
am 10 Jul. 2018
0 Stimmen
The movegui() function seems to be what you're looking for, specifically movegui(figureName, 'center')
3 Kommentare
Varol Aydemir
am 10 Jul. 2018
Bearbeitet: Varol Aydemir
am 10 Jul. 2018
Brian Cianciola
am 10 Jul. 2018
Yeah, sorry about that. Just tested it out and it centers the new window that you open for the figure on your screen.
Varol Aydemir
am 10 Jul. 2018
Sean de Wolski
am 10 Jul. 2018
0 Stimmen
What if you adjust the live editor to have figures inline? Button on right hand side of editor.
1 Kommentar
Varol Aydemir
am 10 Jul. 2018
Kategorien
Mehr zu Live Scripts and Functions finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
