Replies: 1 comment
-
Thanks for reaching out! This is an excellent question, I don't think you can do this by default in Mesa currently. I know NetLogo has the Bitmap Extension and If you update to the latest Mesa pre-release (with @Corvince what do you think, is this something we might want to support? I know some cases like this where modellers like to use a map or something like that as background image. Also maybe it would be nice to write a guide on how to create you own custom space drawer in SolaraViz. |
Beta Was this translation helpful? Give feedback.
-
how to put the image as a background for the grid?
background_image_path = 'cities/lviv.png'
chart = mesa.visualization.ChartModule(
[{"Label": "Infected", "Color": "Black"}, data_collector_name="datacollector"
)
grid = mesa.visualization.CanvasGrid(agent_portrayal, config['width'], config['height'], 500, 500)
server = mesa.visualization.ModularServer(
VirusModel, [grid, chart], "VirusModel", model_params
)
server.port = 8521
server.launch()
Beta Was this translation helpful? Give feedback.
All reactions