Open gasparalfaro opened 2 years ago
You're better off using a matrix to represent the properties instead of agents. Seems like you're making a cellular automaton. See e.g. https://juliadynamics.github.io/AgentsExampleZoo.jl/dev/examples/forest_fire/
In Agents.jl version 5.4 you're better of using GridSpaceSingle
. I think I'll make this the way that GridSpaceSingle
is plotted, which is a grid space that allows at most one agent per position.
I want to plot an Agent Based Model with each agent being one square of color so that the plot doesn't have any white space. To do so I have set the shape of the agent as a :rect and chosen a size for the marker. I imagine that if I set the resolution of the plot to the number of agents in each side multiplied by the size of each agent, no white space should be visible and the markers won't overlap each other.
As model I have an AgentBasedModel with (50,50) grid dimension and each Gamer has a propertie named strategy that controls the color.
I'm not able to change the resolution for abmplot. It throws ERROR: setting resolution for scene via plot attribute not supported anymore
How could I set the resolution instead? Or, is there any other way to get a plot with a square grid of each agent as a colored square without any white space?
I have tried setting a custom heatmap but the moment one of the strategies with largest or smaller number disappears, the colors changes.