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

Commit

Permalink
Fix abm_play function (#79)
Browse files Browse the repository at this point in the history
* Fix #78

* Bump patch number

* Remove inspector variable
  • Loading branch information
fbanning committed Dec 1, 2021
1 parent 25dac30 commit 79ff158
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "InteractiveDynamics"
uuid = "ec714cd0-5f51-11eb-0b6e-452e7367ff84"
repo = "https://github.com/JuliaDynamics/InteractiveDynamics.jl.git"
version = "0.18.0"
version = "0.18.1"


[deps]
Expand Down
7 changes: 3 additions & 4 deletions src/agents/plots_videos.jl
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,9 @@ before the plot is updated, and "sleep" the `sleep()` time between updates.
* `ac, am, as, scheduler, offset, aspect, scatterkwargs`: propagated to [`abm_plot`](@ref).
* `spu = 1:100`: The values of the "spu" slider.
"""
function abm_play(model, agent_step!, model_step! = Agents.dummystep; spu = 1:100, kwargs...)
fig = Figure(; resolution = (600, 700), backgroundcolor = DEFAULT_BG)
ax = fig[1,1][1,1] = dimensionality(model) == 3 ? Axis3(fig) : Axis(fig)
abmstepper = abm_init_stepper_and_plot!(ax, fig, model; kwargs...)
function abm_play(model, agent_step!, model_step! = Agents.dummystep;
spu = 1:100, kwargs...)
fig, abmstepper = abm_plot(model; resolution = (600, 700), kwargs...)
abm_play!(fig, abmstepper, model, agent_step!, model_step!; spu)
display(fig)
return fig, abmstepper
Expand Down

0 comments on commit 79ff158

Please sign in to comment.