Projects‎ > ‎PredatorPreySimpleBehaviours‎ > ‎

add-dead-to-populations-plot

I add to the Populations plot a plot of number of dead individuals versus elapsed time.

Begin micro-behaviour

Draw 'dead' people in 'Populations' plot

Begin NetLogo code:
substitute-text-area-for dead-pen-color purple    substitute-text-area-for cycle-duration 1           do-after-setup   [do-every cycle-duration       [set-current-plot "Populations"        create-temporary-plot-pen "Dead pen"        set-current-plot-pen "Dead pen"        set-plot-pen-color dead-pen-color        plotxy time                count all-individuals with [my-state = "dead"]]]
End NetLogo code