plt.plot(jd1,spd1)
plt.plot(jd1,spd1,marker="o",markerfacecolor="r",linestyle='None')
plt.show()
print 'click on any obviously bad points and then press the enter key.'
badpoints=ginput(n=0)
index_badpoints=[]
badpoints_num=len(badpoints)
for i in range(len(badpoints)):
index_badpoints.append(int(np.interp(badpoints[i][0],
yeardays,
range(len(yeardays)))))
print index_badpoints #always[107,107,107...]
问题是无论我点击哪个点,我只能得到索引为 107 的点。有人可以帮我解决问题吗?