The pyplot.scatter()
function was tailor made for this reason:
import matplotlib.pyplot as plt
im = plt.imread(image_name)
implot = plt.imshow(im)
# put a blue dot at (10, 20)
plt.scatter([10], [20])
# put a red dot, size 40, at 2 locations:
plt.scatter(x=[30, 40], y=[50, 60], c='r', s=40)
plt.show()
See the documentation for more info.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…