Plot of OSM.test_map() offered in agents.jl seem incorrect

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?

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

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) 

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 :tm:. Sorry for the inconvenience. :slight_smile:

1 Like

I’ve fixed that in Agents 5.1.1 and InteractiveDynamics 0.20.3. Zombie Outbreak in a City · Agents.jl 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)?

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

1 Like

It’s fixed with #71 and was tagged for release today v0.3.4. Updating your environment should therefore update GraphMakie dependency to the newest version as well and fix the issue. :slight_smile: