Here is a different way to describe my problem. I have some figures in the live script output that has a long title. Because it is long, the title is cut off.
How to center a figure in live script output
30 次查看(过去 30 天)
显示 更早的评论
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?
回答(3 个)
Sam Raymond
2020-2-15
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.
0 个评论
Brian Cianciola
2018-7-10
编辑:Brian Cianciola
2018-7-10
The movegui() function seems to be what you're looking for, specifically movegui(figureName, 'center')
3 个评论
Brian Cianciola
2018-7-10
Yeah, sorry about that. Just tested it out and it centers the new window that you open for the figure on your screen.
Sean de Wolski
2018-7-10
What if you adjust the live editor to have figures inline? Button on right hand side of editor.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!