How to set figure size in 2025a

197 ビュー (過去 30 日間)
Shengxiang
Shengxiang 2025 年 7 月 16 日
コメント済み: dpb 2025 年 7 月 16 日
Hi, all
I just upgrated matlab to 2025a today and i immediately notice one thing: how do we set figure size now???
I used to do something like
set(gcf, "units", "inches", "position", [0, 0, 6, 4])
and copy/paste it into ppt - i would have a figure with aspect ratio 6 inch wide by 4 inch tall
----
however, now it gives me a figure that is 6 inch wide but 4.33 inch tall.
I tried InnerPosition/OuterPosition/PaperPositoin, none of them worked.
  4 件のコメント
Shengxiang
Shengxiang 2025 年 7 月 16 日
Thank you so much, Adam and dqb. The operating system i am using is windows 11 Enterprise (23H2). I will contact tech support reporting it as bug.
dpb
dpb 2025 年 7 月 16 日
"...let us know how you're copying the figure. "
He didn't add that detail in the comment above, but I'm guessing from the way the description was written he's been doing it by keyboard Ctrl-C/Ctrl-V, not via code. Of course, one would hope the code would produce same results...

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

回答 (1 件)

Adam Danz
Adam Danz 2025 年 7 月 16 日
編集済み: Adam Danz 2025 年 7 月 16 日
Thanks for mentioning this. It's being looked into.
In the meantime, exportgraphics and copygraphics have new (R2025a) properties to specify the width and height of the exported image that may be helpful for the workflow you described.

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

タグ

製品


リリース

R2025a

Community Treasure Hunt

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

Start Hunting!

Translated by