Agents.jl abm_data_exploration function returns static image

Hi,

I am moving to Julia for my Agent-Based Modelling needs from NetLogo. However, I am interested in keeping the interactive interface of NetLogo which makes the initial modelling easier. I figured that this could be done with the abm_data_exploration function from the tutorials. (Schelling's segregation model · Agents.jl)

However, when I run this, all I get is a static image.

I must be doing something wrong, which I cannot figure out - however, this happens in both IJulia notebooks as well as Juno.

Does anybody have any ideas on how to solve this?

Thank you!

My expectation is that you’re using CairoMakie as your plotting backend here? We probably need to make the documentation more specific—interactivity can only work using GLMakie, which means the interactive application (currently) doesn’t work in the notebook environment. You could try WGLMakie, although we’ve never tested that functionality.

1 Like

Thank you for the quick reply! I will try with WGLMakie / GLMakie.

Is the example code working in non-Notebook environments? i.e. Atom (Juno)?

Thanks!

Yes!

We’ll certainly work on getting notebooks happening, just waiting for some of the tooling outside of Agents.jl to mature.

2 Likes

Thank you @Libbum this is also working now.

For anyone who stumbles upon this in the future, if you are using Juno on Atom, running the code within the editor will display a static image in the Plots plane. You need to run figure on the Julia REPL to get the GLMakie interface.