Skip to content

Commit

Permalink
GoL_fast Viz: Disable colorbar,
Browse files Browse the repository at this point in the history
Tested with latest Mesa 3.0.0b0, works flawlessly!
  • Loading branch information
EwoutH committed Oct 5, 2024
1 parent a8b71b2 commit 7a74497
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions examples/conways_game_of_life_fast/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,45 @@
"cell_layer": {
"color": "Black",
"alpha": 1,
"colorbar": False,
},
}

model_params = {
"width": {
"type": "SliderInt",
"value": 20,
"value": 30,
"label": "Width",
"min": 5,
"max": 40,
"max": 60,
"step": 1,
},
"height": {
"type": "SliderInt",
"value": 20,
"value": 30,
"label": "Height",
"min": 5,
"max": 40,
"max": 60,
"step": 1,
},
"alive_fraction": {
"type": "SliderFloat",
"value": 0.2,
"label": "Cells alive",
"min": 0,
"max": 1,
"step": 0.01,
},
}

gol = GameOfLifeModel()

layer_viz = make_space_matplotlib(propertylayer_portrayal=propertylayer_portrayal)
TotalAlivePlot = make_plot_measure("Cells alive")
FractionAlivePlot = make_plot_measure("Fraction alive")

page = SolaraViz(
gol,
components=[layer_viz, TotalAlivePlot, FractionAlivePlot],
components=[layer_viz, TotalAlivePlot],
model_params=model_params,
name="Game of Life Model",
)

0 comments on commit 7a74497

Please sign in to comment.