Closed
Conversation
|
Performance benchmarks:
|
Member
|
Thanks for taking a stab at this issue.
|
Member
|
Hi @LunnyRia! Thanks for the PR. Would you like to continue working on this? If so, is the feedback from quaquel helpful? And do you need anything from us? |
Member
|
superseded by #2557 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR removes cell_coloring_property from VoronoiGrid and sets it as an argument when visualizing.
Bug / Issue
Related to Minor refactoring of VoroinoiGrid #2437.
Implementation
In
voronoi.py, there are three instances where thecell_coloring_propertyattribute is mentioned. All of these instances should be commented out (but not deleted). By examiningmpl_space_drawing.py, I found that this attribute is used to set the transparency (alpha) of polygons. Based on the last line ofvoronoi.py, I understand that the developer intended to set its value to0. However, I don’t quite understand why it was defined as astr, as indicated bycell_coloring_property: str | None = None.To enable setting the transparency of Voronoi polygons during visualization, I modified
mpl_space_drawing.py. In thedraw_voronoi_gridfunction, I added this attribute as a new parameter. GPT and Claude suggested more refined approaches for this visualization, but I want to first confirm that my modification doesn’t introduce any bugs and hear your opinions on it.Testing
Using the
.pre-commit-config.yamlfile from the root folder of the Mesa project, I ranpre-commit run --all-fileslocally, and all checks passed.Additional Notes
I just started learning Mesa and look forward to your suggestions. Thank you!