Art
Art

Reputation: 1335

matlab: figure size, same axis size

I have a figure with fixed size, like that:

hFig = figure(1);
set(hFig, 'Position', [200 200 500 500])

But the thing is, that I want to have my AXIS with fixed size (i want them to be a square), not (necessary) the whole figure... - see image attached, Y axis is a bit longer than X axis (of course longer in a meaning of display... X and Y axis range is set to the same value). How to adjust it?

Thanks!

particle trajectory

Upvotes: 4

Views: 1731

Answers (1)

Fantastic Mr Fox
Fantastic Mr Fox

Reputation: 33854

Use axis equal to set the spacing of the axis to be the same.

Upvotes: 4

Related Questions