-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to add Histogram to the visualization! #13
Comments
|
Thank you for the help. I fixed the code and it looks like this: from money_model import * class HistogramModule(VisualizationElement):
def agent_portrayal(agent):
grid = mesa.visualization.CanvasGrid(agent_portrayal, 10, 10, 500, 500) chart = mesa.visualization.ChartModule([{"Label": "Gini", histogram = HistogramModule(list(range(10)), 200, 500) server = mesa.visualization.ModularServer(MoneyModel, server.port = 8521 # The default However, I get the following error: I used the following fix on HistogramModule.js as well but it doesn't solve the problem: |
I am trying the "MoneyModel" from the tutorial and it demonstrates how to add a "Histogram" to the visualization window. I followed the instructions and I get the following error:
module 'mesa.flat.visualization' has no attribute 'HistogramModule'
I made sure I saved the "HistogramModule.py" and "HistogramModule.js" in the same folder. It still gives me the same error.
The text was updated successfully, but these errors were encountered: