0

I have made some scatter plot and show it, but after that, I want to show my drawing process by redrawing those scatter plot with another color.

I want to dynamic show the process of drawing. How can I do that ??

I add the ax.scatter() after plt.show(), but it doesn't works.

import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)

ax.scatter([1,2,3,4,5,6,7,8,9,10],[1,2,3,4,5,6,7,8,9,10],marker=".")
plt.grid(ls=':')
plt.show()
Michael
  • 1
  • 1
  • It sounds like you want to turn on interactive mode: https://matplotlib.org/faq/usage_faq.html#what-is-interactive-mode – RuthC Dec 31 '17 at 15:24
  • Thank you ,I saw your advice, I think it's useful, this document show me the the way to do it in terminal, but terminal command line is unresponsive. How can I do it in python file ? – Michael Jan 01 '18 at 04:29
  • I think you are looking for an animation. See [this question](https://stackoverflow.com/questions/42722691/python-matplotlib-update-scatter-plot-from-a-function). If this solves the problem, one can close as duplicate, otherwise please refine your question to explicitely tell in how far this is different. – ImportanceOfBeingErnest Jan 09 '18 at 09:03
  • Thank you very much, you are the perfect solution to my problem。 – Michael Jan 16 '18 at 02:51

0 Answers0