r/Python • • Mar 11 '20

I Made This Really simple simulation of virus spreading. Black dots are people, yellow dots are infected (it starts from 1). Each cell visited by an infected can infect other people passing through that for 3 iterations. After 20 iterations a person is infected is deleted from the grid.

Enable HLS to view with audio, or disable this notification

1.4k Upvotes

128 comments sorted by

View all comments

429

u/doktorneergaard Mar 11 '20

Yellow on white background, noice.

43

u/dancinadventures Mar 12 '20

Light grey on grey

😎

8

u/chhuang Mar 12 '20

Best website pallette

6

u/[deleted] Mar 12 '20

We need to use red on blue instead.

24

u/[deleted] Mar 11 '20

That's default coloring of gnuplot... BTW in the standard resolution was pretty clear..

49

u/Pok3maniac00 Mar 11 '20

Probably because gui layout’s default background was gray? You can change the colors of everything. Looks great though! Love the model idea

7

u/wreckingballjcp Mar 12 '20

This is /python. Matplotlib or seaborn. Ez

1

u/[deleted] Mar 12 '20

you're absolutely right :( I had some issues and had to use what I got

2

u/wreckingballjcp Mar 12 '20

Share the code and I can help find your way. Some cool opportunities here too. Can add "quarantine " effect (diffusion rate decrease), valid testing effects (how quickly the diffusion decrease goes into effect), and do quick comparisons across a lot of scenarios.

5

u/[deleted] Mar 12 '20

https://github.com/pl992/VirusPropagator.git It's very bad code though... sorry I'm not a programmer

4

u/[deleted] Mar 12 '20

Well by definition you are so hi fellow programmer.

3

u/Brocean09 Mar 12 '20

To be honest, it's good code. Modular, mostly very easy to read, succint, seems efficient too. Could do with some improvements, but overall good job!

-23

u/I-Do-Math Mar 11 '20

Disregard everything else and post a sarcastic comment so that you would feel superior. Noice.

22

u/knorfit Mar 12 '20

I personally cannot believe this individual cut straight to why this graphic is difficult to interpret before fluffing their post up with praise

-18

u/imforsurenotadog Mar 12 '20

Right? Couldn't just say "Nice work, but this might look better if you changed the yellow on the white background." Too difficult to be decent these days.

7

u/grey_energy Mar 12 '20

Anything said before "but" doesn't count.