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

5 Ansichten (letzte 30 Tage)
felix.b
felix.b am 9 Okt. 2019
Kommentiert: felix.b am 10 Okt. 2019
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 Kommentare
Adam Danz
Adam Danz am 9 Okt. 2019
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 am 10 Okt. 2019
That is good and important to know. Thank you Adam!

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Graphics Object Properties finden Sie in Help Center und File Exchange

Produkte


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by