I would like to plot many lineplots in a loop in a jupyter notebook, and see the updates as the loop progresses. I want a single figure with many overlayed lineplots in it. If I do something like
import seaborn as sns
for i in range(N):
x_data, y_data = get_data(i)
sns.lineplot(x_data, y_data)
then the plot only shows up once the loop is finished. If I stick a plt.pause(1)
in the loop like I've seen in related questions, then I get multiple figures. How can I do this?