I am trying to manually curate a dataset by going through each set and choosing whether or not to keep it or reject it. To do this, I want to plot a dataset, use the click module (https://click.palletsprojects.com/en/7.x/) to choose whether to keep it, then plot the next dataset and repeat. Currently, I am able to plot each set and choose whether or not to save it, but the problem is each graph remains above the next one. I need to go through thousands of datasets so it isn't viable to have them all plotted simultaneously.
for q in np.arange(0,len(x)):
Thing = Data[x[q]-100:x[q]+400]
Thing2 = Data2[x[q]-100:x[q]+400]
plt.plot(Thing)
plt.plot(Thing2)
plt.show()
if click.confirm('Do you want to save?', default=True):
List.append(x[q])
I have seen other people recommending pyplot.ion or the matplotlib animations, but neither of them seem to be working, perhaps due to the interaction with the "Click" input box appearing. All I want to do is close each plot before the next one is made, but it is proving impossible!
Thanks in advance.