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

Update examples to use updated space drawing #2442

Merged
merged 7 commits into from
Oct 30, 2024

Conversation

quaquel
Copy link
Member

@quaquel quaquel commented Oct 30, 2024

This updates the examples to use the new space drawing functionality properly.

I actually think that sugarscape can now be fully expressed without using a custom space drawing function, but I have left that for now since its convenient to have an example that shows how custom space drawing is possible.

Closes #2432

Copy link

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
BoltzmannWealth small 🔴 +11.9% [+9.9%, +13.7%] 🔵 +0.1% [-0.1%, +0.3%]
BoltzmannWealth large 🔵 +1.6% [+1.1%, +2.3%] 🔴 +7.0% [+6.4%, +7.7%]
Schelling small 🔵 +0.6% [+0.0%, +1.0%] 🔵 +0.5% [+0.3%, +0.8%]
Schelling large 🔵 +0.5% [-0.9%, +2.0%] 🔵 +0.8% [-2.5%, +4.1%]
WolfSheep small 🔵 -1.1% [-1.4%, -0.9%] 🔵 +0.1% [-0.1%, +0.4%]
WolfSheep large 🔵 -1.0% [-1.9%, -0.2%] 🔵 -3.5% [-5.1%, -1.8%]
BoidFlockers small 🔵 +2.1% [+1.5%, +2.6%] 🔵 +1.1% [+0.6%, +1.7%]
BoidFlockers large 🔵 +1.3% [+0.6%, +1.9%] 🔵 +1.7% [+1.0%, +2.5%]

@quaquel quaquel added the example Changes the examples or adds to them. label Oct 30, 2024
Copy link
Member

@EwoutH EwoutH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff. Could you add screenshots how they now look?

@quaquel
Copy link
Member Author

quaquel commented Oct 30, 2024

The only one that really is changed is virus on a network. The others are mainly cleaning up of code and minor visual tweaks (e.g. set_aspect('equal')) on axes.

Screenshot 2024-10-30 at 20 07 07

@quaquel quaquel merged commit 9de5595 into projectmesa:main Oct 30, 2024
11 of 12 checks passed
@quaquel quaquel deleted the examples branch November 4, 2024 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
example Changes the examples or adds to them.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update examples to use cleaned up matplotlib space plotting
2 participants