Skip to content

Commit bb96487

Browse files
rhtCorvince
authored andcommitted
Sugarscape G1MT: Update to Mesa 2.1.2 JupyterViz API
1 parent 221c422 commit bb96487

File tree

1 file changed

+3
-3
lines changed
  • examples/sugarscape_g1mt

1 file changed

+3
-3
lines changed

examples/sugarscape_g1mt/app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from sugarscape_g1mt.trader_agents import Trader
88

99

10-
def space_drawer(viz):
10+
def space_drawer(model, agent_portrayal):
1111
def portray(g):
1212
layers = {
1313
"sugar": [[np.nan for j in range(g.height)] for i in range(g.width)],
@@ -31,7 +31,7 @@ def portray(g):
3131

3232
fig = Figure()
3333
ax = fig.subplots()
34-
out = portray(viz.model.grid)
34+
out = portray(model.grid)
3535
# Sugar
3636
# Important note: imshow by default draws from upper left. You have to
3737
# always explicitly specify origin="lower".
@@ -42,7 +42,7 @@ def portray(g):
4242
# Trader
4343
ax.scatter(**out["trader"])
4444
ax.set_axis_off()
45-
solara.FigureMatplotlib(fig, dependencies=[viz.model, viz.df])
45+
solara.FigureMatplotlib(fig)
4646

4747

4848
model_params = {

0 commit comments

Comments
 (0)