Matlab: shape size, same axis size

I have a figure with a fixed size, for example:

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

But the fact is, I want to have my AXIS with a fixed size (I want them to be a square), and not (necessarily) the whole picture ... - see the attached image, the Y axis is slightly longer than the X axis (of course , longer in the display value ... The range of the X and Y axes is set to the same value). How to configure it?

Thanks!

particle trajectory

+4
source share
2 answers

Use axis equal to set the distance between the axes equally.

+4
source

The @ [Fantastic Mr Fox] solution only works when you need to fix both axes of the same size. What if everyone wants both to be arbitrarily different in size, similar to what can be done with the size of the whole figure?

0
source

Source: https://habr.com/ru/post/1443581/


All Articles