DatalogiForAlle / AgentsPy

Agent-based simulation for education in Python
GNU General Public License v3.0
5 stars 0 forks source link

Legend on line graphs #100

Closed dybber closed 3 years ago

dybber commented 3 years ago

Line graphs should display a legend, telling what each line denotes. Currently, you don't have much of an idea.

Screenshot 2020-11-20 at 11 54 43

dybber commented 3 years ago

And is there a problem with the first plot?

JensKanstrupLarsen commented 3 years ago

No, that's just the way it looks, unfortunately. It shows the "infection number" of each agent - when they are infected, it immediately jumps to 1000, and then it gradually decreases until it hits 0, upon which they become immune. It was the only interesting number the epidemic-model had to track, so that's why. A better usage would be in the bread_n_butter.py model to track the utility of each agent.

JensKanstrupLarsen commented 3 years ago

This PR only add legends to the second plot type; the first one (with each line being an agent) is more difficult, since each line is a series, and the legend adds one "descriptor" for each series.