Skip to content
This repository was archived by the owner on Jun 21, 2024. It is now read-only.

Commit 8aafcc7

Browse files
committed
fix missing mean from agents example
1 parent 415b3c2 commit 8aafcc7

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "InteractiveDynamics"
22
uuid = "ec714cd0-5f51-11eb-0b6e-452e7367ff84"
33
repo = "https://github.com/JuliaDynamics/InteractiveDynamics.jl.git"
4-
version = "0.21.8"
4+
version = "0.21.9"
55

66
[deps]
77
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"

docs/src/agents.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,13 @@ fig
8484

8585
# One can furthermore collect data while the model evolves and visualize them using the
8686
# convenience function [`abmexploration`](@ref)
87+
using Statistics: mean
8788
black(a) = a.breed == :black
8889
white(a) = a.breed == :white
8990
adata = [(black, count), (white, count)]
9091
temperature(model) = mean(model.temperature)
9192
mdata = [temperature, :solar_luminosity]
92-
fig, p = abmexploration(model;
93+
fig, abmobs = abmexploration(model;
9394
agent_step! = daisy_step!, model_step! = daisyworld_step!, params, plotkwargs...,
9495
adata, alabels = ["Black daisys", "White daisys"], mdata, mlabels = ["T", "L"]
9596
)
@@ -158,15 +159,15 @@ abmvideo(
158159

159160
# create a basic abmplot with controls and sliders
160161
model, = daisyworld(; solar_luminosity = 1.0, solar_change = 0.0, scenario = :change)
161-
fig, ax, p = abmplot(model;
162+
fig, ax, abmobs = abmplot(model;
162163
agent_step! = daisy_step!, model_step! = daisyworld_step!, params, plotkwargs...,
163164
adata, mdata, figure = (; resolution = (1600,800))
164165
)
165166
fig
166167

167168
#
168169

169-
p
170+
abmobs
170171

171172
#
172173

0 commit comments

Comments
 (0)