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

Commit

Permalink
bugfix reverse limits for min and max in OSM
Browse files Browse the repository at this point in the history
  • Loading branch information
Datseris committed Apr 4, 2022
1 parent 5c5e140 commit 15c271d
Show file tree
Hide file tree
Showing 2 changed files with 5 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.20.3"
version = "0.20.4"

[deps]
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Expand Down
8 changes: 4 additions & 4 deletions src/agents/abmplot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,12 @@ end
"Plot space and/or set axis limits."
function set_axis_limits!(ax, model)
if model.space isa Agents.OpenStreetMapSpace
o = [-Inf, -Inf]
e = [Inf, Inf]
o = [Inf, Inf]
e = [-Inf, -Inf]
for i Agents.positions(model)
x, y = Agents.OSM.lonlat(i, model)
o[1] = max(x, o[1]); o[2] = max(y, o[2])
e[1] = min(x, e[1]); e[2] = min(y, e[2])
o[1] = min(x, o[1]); o[2] = min(y, o[2])
e[1] = max(x, e[1]); e[2] = max(y, e[2])
end
elseif model.space isa Agents.ContinuousSpace
e = model.space.extent
Expand Down

0 comments on commit 15c271d

Please # to comment.