I would like to make the axes of a matplotlib plot a square, but do so by changing the scale of the axes rather than the axis limits. How can this be done?
Note: I have tried the command plt.gca().set_aspect('equal')
, but this seems to equalize the scaling, rather than the lengths, of the x and y axes, consistent with the matplotlib documentation.