I would like to plot some coordinates on top of an image. I want to invert the axis for the said coordinates but not for the image. But with my code, the axis gets inverted for both the image and the coordinates.
This is my code:
import numpy as np
from matplotlib import pyplot as plt
plt.rcParams["figure.figsize"] = [10, 10]
plt.rcParams["figure.autolayout"] = True
im = plt.imread("bird.png")
fig, ax = plt.subplots()
im = ax.imshow(im, extent=[0, 720, 0, 576])
x = np.array(range(300))
fig.gca().invert_xaxis()
fig.gca().invert_yaxis()
ax.scatter(x_coords_true, y_coords_true, color='red')
ax.scatter(x_coords_pred, y_coords_pred, color='yellow')
plt.show()
Can you help me modify the code to get the result I am expecting, please?