-
Notifications
You must be signed in to change notification settings - Fork 143
Open
Description
Describe the bug
Tooltips for interactive plots for models with graph space don't show the expected info. Looking at the code, I would expect to see the node position and the number of agents:
Agents.jl/ext/AgentsGraphVisualizations/src/spaces/graph.jl
Lines 89 to 95 in 164f735
| function Agents.agent2string(model::ABM{<:GraphSpace}, pos) | |
| ids = Agents.ids_in_position(pos, model) | |
| return """▶ Node $pos | |
| # of agents: $(length(ids)) | |
| """ | |
| end |
But instead I see x, y and z (always 0)
I want to create a custom tooltip (adding a custom method for Agents.agent2string(model::ABM{<:GraphSpace}, pos)) but it seems that this is not properly hooked.
Minimal Working Example
using Agents, Graphs, GraphMakie, GLMakie
# Minimal GraphSpace model with no agents
g = complete_graph(4)
space = GraphSpace(g)
@agent struct A(GraphAgent) end
model = StandardABM(A, space; properties = Dict(), model_step! = dummystep)
fig, abmobs = abmexploration(model)
figAgents.jl version
Agents v6.3.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels