Whenever I generate a graph in matplotlib, the axis seems to be inverted. As an example, I created a figure from an array of 0s:
dims = [100,100]
square = np.zeros(dims)
plt.imshow(square)
This produces the following figure:
Whilst doing:
dims = [100,100]
square = np.zeros(dims)
plt.gca().invert_yaxis()
plt.imshow(square)
produces the exact same figure.
How can I make it so my y-axis starts at 0 at the origin?

I think
invert_yaxisdoesn't work because in your caseAxesare empty:You can set axis manually instead: