Matlab figures: Axes of same length (in points, cm, etc.)

4 ビュー (過去 30 日間)
felix.b
felix.b 2019 年 10 月 9 日
コメント済み: felix.b 2019 年 10 月 10 日
Dear colleagues,
how can I adjust the size of Matlab figures in such a way that the axes have the same height and width?
I am using the same axis limits and the command "set(groot,'defaultfigureposition',[100 100 750 750]);". However the figure axes still are longer in the vertical direction than in the horizontal direction.
Is there any possibility to properly set the figure or axes size of the same length?
Best regards,
Felix
  4 件のコメント
Adam Danz
Adam Danz 2019 年 10 月 9 日
Note that default figure size units are pixels which aren't necessarily square so even if the width and height values are the same, that doesn't mean the figure's actual width and height are the same. Also, the "position" property of a figure sets the size of the drawable area. If you'd like square figures including the frame, you'd need to set the units to something not dependent on monitor size like inches or centimeters and then set the OuterPosition property.
figure('units','inches','OuterPosition', [2,2,4,4])
felix.b
felix.b 2019 年 10 月 10 日
That is good and important to know. Thank you Adam!

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

回答 (0 件)

カテゴリ

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

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by