[Matplotlib-users] Arranging subplots on a square regular grid

Daniele Nicolodi daniele at grinta.net
Tue Oct 30 17:35:12 EDT 2018


Hello,

I would like to arrange a number of square subplots (as in subplots with
square axes as obtained with `ax.axis('equal')`) in a grid such that the
distance between rows and columns is exactly the same.

I can use a GridSpec but, as soon as I ask for the axes to be square,
the distance between axes changes. Is there a way to enforce the equal
distances constrain (namely stretch the padding between the axes and the
margin of the figure but do not stretch the padding between axes) or the
only solution is to do it manually?

Thank you in advance.

Best,
Dan


More information about the Matplotlib-users mailing list