'Is there a way to show multiple continously moving dots on a 2D graph?

For my master thesis i am researching dqn behaviour by recreating a hunter and prey enviroment. This enviroment is 2D and should fit around 1000 dots that are constantly moving. The Position of the hunter and prey are tracked with their x and y coordinate.

I tried this version of FuncAnimation: Is there a way to iteratively add plots to Animation.FuncAnimation()?

But this means i would have to hard code all 1000 dots, and the number of dots cannot be changed by the user.

Is there an easier way?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source