# Plot of OSM.test\_map() offered in agents.jl seem incorrect

**URL:** <https://discourse.julialang.org/t/plot-of-osm-test-map-offered-in-agents-jl-seem-incorrect/78948>\
**Category:** Specific Domains\
**Tags:** agents\
**Created:** [April 3, 2022, 3:12pm UTC](https://discourse.julialang.org/t/plot-of-osm-test-map-offered-in-agents-jl-seem-incorrect/78948 "2022-04-03T15:12:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![imantha](https://avatars.discourse-cdn.com/v4/letter/i/6a8cbe/32.png) [@imantha](https://discourse.julialang.org/u/imantha)\
**Post date:** [April 3, 2022, 3:12pm UTC](https://discourse.julialang.org/t/plot-of-osm-test-map-offered-in-agents-jl-seem-incorrect/78948/1 "2022-04-03T15:12:05Z")

</div>

Hi,

I recently updated `agents.jl` → 5.0.0 and `InteractiveDynamics.jl` → 0.20.1. I am trying to use `abmvideo()` and `ambplot()` functions to plot an openstreet test map offered by the package. However something seems to be incorrect about the size of the plot. I noticed the same behaviour in the zombie outbreak example shown in the website as well. Any idea why the map with streets are not been plotted?

```julia
function initialise(;map_path=OSM.test_map(),num_casualties, num_rescuers, num_pma, num_hospitals, properties)
    model = AgentBasedModel(
        Union{Casualty, Rescuer,PMA,Hospital},
        OpenStreetMapSpace(map_path),
        scheduler = Schedulers.fastest;
        properties = properties
    )
    # Add casualties to Model
    for i=1:num_casualties
        pos = random_position(model)
        casualty = Casualty(nextid(model),pos,trauma = rand([1,2,3]))
        add_agent_pos!(casualty,model)
    end

...
end

```

```julia
properties = Dict(:ticks => 0, :dist_per_step => 100, :stab_cap => NaN, :stab_time => 20)
model = initialise(
    num_casualties = 25, 
    num_rescuers = 10, 
    num_pma=1, 
    num_hospitals = 1, 
    properties = properties
)
fig,_ = abmplot(model; as=agent_size, am=agent_markers, ac=agent_color) 

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/f/b/fbdeebe65369190ce41593f38c77e9bd9ce60a95.png)

---

<div class="post-metadata">

**Author:** ![fbanning](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fbanning/32/14972_2.png) [@fbanning](https://discourse.julialang.org/u/fbanning)\
**Post date:** [April 4, 2022, 10:08am UTC](https://discourse.julialang.org/t/plot-of-osm-test-map-offered-in-agents-jl-seem-incorrect/78948/2 "2022-04-04T10:08:55Z")

</div>

The map is plotted correctly. You can see that if you zoom in on the map (scroll wheel on your mouse). It’s a problem with the automatically generated limits for the map and the bug stems from one of the packages we depend on. This is already fixed in their source code and autolimits for our OSM maps will work again out of the box soon ™. Sorry for the inconvenience. 🙂

---

<div class="post-metadata">

**Author:** ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Post date:** [April 4, 2022, 3:07pm UTC](https://discourse.julialang.org/t/plot-of-osm-test-map-offered-in-agents-jl-seem-incorrect/78948/3 "2022-04-04T15:07:10Z")

</div>

I’ve fixed that in Agents 5.1.1 and InteractiveDynamics 0.20.3. [Zombie Outbreak in a City · Agents.jl](https://juliadynamics.github.io/Agents.jl/dev/examples/zombies/) Seems simple enough to calculate limits on our own for now… @fbanning , the issue was originally from GraphMakie.jl, right? I tried to find the commit/PR that fixed it, do you mind linking it please (if you know it)?

---

<div class="post-metadata">

**Author:** ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Post date:** [April 4, 2022, 3:09pm UTC](https://discourse.julialang.org/t/plot-of-osm-test-map-offered-in-agents-jl-seem-incorrect/78948/4 "2022-04-04T15:09:41Z")

</div>

p.s. @imantha in the future please open these in the category “Modelling and Simulations”, it makes it faster to find 🙂

---

<div class="post-metadata">

**Author:** ![fbanning](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fbanning/32/14972_2.png) [@fbanning](https://discourse.julialang.org/u/fbanning)\
**Post date:** [April 4, 2022, 3:35pm UTC](https://discourse.julialang.org/t/plot-of-osm-test-map-offered-in-agents-jl-seem-incorrect/78948/5 "2022-04-04T15:35:02Z")

</div>

> [@Datseris](#):
>
> the issue was originally from GraphMakie.jl, right? I tried to find the commit/PR that fixed it, do you mind linking it please (if you know it)?

It’s fixed with [#71](https://github.com/JuliaPlots/GraphMakie.jl/pull/71) and was tagged for release today [v0.3.4](https://github.com/JuliaPlots/GraphMakie.jl/releases/tag/v0.3.4). Updating your environment should therefore update GraphMakie dependency to the newest version as well and fix the issue. 🙂
