-
Notifications
You must be signed in to change notification settings - Fork 939
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 property layer viz to sugarscape #2653
base: main
Are you sure you want to change the base?
Conversation
Performance benchmarks:
|
"vmin": 0, | ||
"vmax": 10, | ||
}, | ||
"spice": {"color": "red", "alpha": 0.8, "colorbar": True, "vmin": 0, "vmax": 10}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sanika-n The formatting here seems off --- are you using the ruff
linter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I actually wrote spice in the same way as sugar but when I ran ruff it was changing the formatting of spice and it didn't allow me to keep it like sugar, so now I have made sugar formatted like spice...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @sanika-n -- this code shows the power of property layer.
Just one question as the formatting does not seem to be uniform.
I had a look at sugarscape a few weeks back as well. It made me realize that the property layer portrayal needs some more work at the API level (see also #2640). However, in the meantime, this looks fine to me. However, could you experiment a bit with colormaps that are more distinct that the current red and blue? Likewise, what happens if you lower the alpha to say 0.5? |
Thanks for this. I'll think about this a bit more (also in light of the various other visualization and API issues that are popping up). I am inclined to accept this PR while we hash out a better overall API level solution. |
I concur @quaquel |
This PR addresses Issue #2580, I have replaced the normal matplotlib visualization in sugarscape to the property layer visualization with matplotlib as backend.
Before
After