I am trying to have a plot inside a loop in Google Colabs. The result should be something like this plot: , produced with the following code:
plt.axis([0, 10, 0, 10])
for i in range(10):
plt.scatter(i, i + 1)
plt.pause(0.5)
plt.show()
However, the output is 10 plots with only one point in each, instead of having one plot, and one point added to that plot every 0.5 seconds.
I guess it has some relationship with the interactive mode and backends of Google Colab, but I've tried many things and none work. Thank you!