I am writing a project in Python Spyder on my Mac.
The project is an ecosystem in which there is grass, sheep, wolves. With each iteration The grass grows, sheep eat grass, some die of starvation, some die of overweight, some get eaten by wolves etc. I want to see if a stable system can be achieved with all the random variables etc.
The code is
1 Create grass, sheep, wolves
2for iterations in range(a_very_very_big_number) #can go on for ever
3 Each grass grows, Each sheep eats grass, each wolf eat sheep etc etc.
count how many live sheep and wolves at end of these events
plot those values with a point (scatterplot?).
x axis is a_very_very_big_number mod 500 # goes back to left of screen every 500
y axis is number of sheep, and wolves
if iterations mod 500== 0 then clear all points off the screen
(now go back to line 3 for another iteration)
Question: how to plot it?
I have tried many programs I found here and elsewhere but nothing works. I get error codes. Or it only show one set of dots before clearing the screen.
years ago I knew how to do this but I can’t remember now!
Jonathan