I've got 3 images I'm creating, and I want to draw text on the middle one, or maybe the first one. However by default my code is drawing on the third one (right-most). Here is the relevant code:
fig, axes = plt.subplots(nrows=1, ncols=3)
text = "testing"
px = [x_pt_1, x_pt_2]
py = [y_pt_1, y_pt_2]
plt.plot(px, py, color="white", linewidth=2)
plt.text(100, 50, text, size=16, color='white')
imgs = [img_left, img_middle, img_right]
for img, ax in zip(imgs, axes.ravel()):
ax.imshow(img)
fig.tight_layout()
# Show images
plt.show()
Edit
I was linked to another question because allegedly this is a duplicate. But I opened up the question and they don't address this particular issue.
So instead of having the text be put on the rightmost image, how do I put it on the middle or left images? And in general I'd like to put some text on one image, some different text on another image, etc.