How to center a figure in live script output

38 ビュー (過去 30 日間)
Varol Aydemir
Varol Aydemir 2018 年 7 月 10 日
回答済み: Sam Raymond 2020 年 2 月 15 日
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 件のコメント
Varol Aydemir
Varol Aydemir 2018 年 7 月 11 日
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.

サインインしてコメントする。

回答 (3 件)

Sam Raymond
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.

Brian Cianciola
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
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.
Varol Aydemir
Varol Aydemir 2018 年 7 月 10 日
No worries! Thanks for the response though!

サインインしてコメントする。


Sean de Wolski
Sean de Wolski 2018 年 7 月 10 日
What if you adjust the live editor to have figures inline? Button on right hand side of editor.
  1 件のコメント
Varol Aydemir
Varol Aydemir 2018 年 7 月 10 日
Unfortunately, It doesn't help either

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGraphics Object Programming についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by