diff --git a/Project.toml b/Project.toml index e8c4a3ed..bf5efa29 100644 --- a/Project.toml +++ b/Project.toml @@ -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" diff --git a/src/agents/abmplot.jl b/src/agents/abmplot.jl index e0763fa5..ab45ca1f 100644 --- a/src/agents/abmplot.jl +++ b/src/agents/abmplot.jl @@ -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