This answer has beautifully showed how to reverse the y-axis. However, I now wish to draw all my dots, etc. with respect to this reversed version of coordinate system.
I find the following all fail this purpose:
plt.figure()
plt.gca().invert_yaxis()
plt.plot([1,2],[1,3]) # just a random line
plt.figure()
plt.plot([1,2],[1,3]) # just a random line
plt.gca().invert_yaxis()
How may I fix it and let it work?
For me, if I use an OOP-style figure, i.e.
fig = plt.figure()
axes = fig.add_axes([0.1, 0.1, 0.8, 0.8])
axes.plot([1,2],[1,3]) # just a random line
axes.invert_yaxis()
it works.
But for the current two non-OOP styles listed above, a new figure with a reversed y-axis is created, but the line is not there.