Skip to content
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

added color-bar for spice #2622

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions mesa/examples/advanced/sugarscape_g1mt/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@
cmap="spring",
origin="lower",
)
fig.colorbar(im, orientation="vertical")
fig.colorbar(im, ax=ax, orientation="vertical", pad=0.1, fraction=0.046)

Check warning on line 32 in mesa/examples/advanced/sugarscape_g1mt/app.py

View check run for this annotation

Codecov / codecov/patch

mesa/examples/advanced/sugarscape_g1mt/app.py#L32

Added line #L32 was not covered by tests
# Spice
ax.imshow(
im_spice = ax.imshow(

Check warning on line 34 in mesa/examples/advanced/sugarscape_g1mt/app.py

View check run for this annotation

Codecov / codecov/patch

mesa/examples/advanced/sugarscape_g1mt/app.py#L34

Added line #L34 was not covered by tests
np.ma.masked_where(model.grid.spice.data <= 1, model.grid.spice.data),
cmap="winter",
origin="lower",
)
fig.colorbar(im_spice, ax=ax, orientation="vertical", fraction=0.046, pad=0.04)

Check warning on line 39 in mesa/examples/advanced/sugarscape_g1mt/app.py

View check run for this annotation

Codecov / codecov/patch

mesa/examples/advanced/sugarscape_g1mt/app.py#L39

Added line #L39 was not covered by tests
# Trader
ax.scatter(**out["trader"])
ax.set_axis_off()
Expand Down
Loading