-
Notifications
You must be signed in to change notification settings - Fork 879
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
More parameter functionality in matplotlib (default) drawer visualization #2242
More parameter functionality in matplotlib (default) drawer visualization #2242
Conversation
No longer are shape, color, and marker explicitly implemented. Instead, the implementation is more parameter-independent.
old parameter keywords now work for backwards compatibility. x and y position are now added and the code definitely does work.
Performance benchmarks:
|
for more information, see https://pre-commit.ci
Thanks for this PR, sorry none of us got back to you (@projectmesa/maintainers we should be better in this - a full week is quite long). It looks really useful. We indeed need to discuss how we handle variable names. I might support going full |
There is a problem with using Matplotlib nomenclature because Altair's API naming might be different. But it's better to pick either Matplotlib/Altair than to create a separate new naming scheme that nobody is familiar with. I haven't looked at Altair's but I assume the naming would be more modern. |
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.
I really like the capabilities this brings. Thanks for working on this, good visualization is important.
This does need to be documented really well. Try if you can add some more examples and edge cases to your PR post.
solara.FigureMatplotlib(space_fig, format="png", dependencies=dependencies) | ||
|
||
|
||
# used to make non(less?)-breaking change | ||
# this *does* however block the matplotlib 'color' param which is somewhat distinct from 'c'. |
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.
Can you explain or link to how color
and c
differ in matplotlib (scatter)?
cmap_exists = portray_data.pop("cmap", None) | ||
norm_exists = portray_data.pop("norm", None) | ||
vmin_exists = portray_data.pop("vmin", None) | ||
vmax_exists = portray_data.pop("vmax", None) |
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.
I have a feeling this can be done more elegant
@rmhopkins4 are you still interested in working on this? If so, how can I help? |
@EwoutH, while in a perfect world, we hope that @rmhopkins4 hasn't moved on and will gloriously return to this awesomeness to carry the torch, but if they have - I wonder if we should create a tag to recognize incomplete but valuable PRs that might be picked up in the future for completion? (Maybe it takes 2 core contributors to agree on the potential -- so we don't add the tag to every PR.) |
As soon as #2336 is merged I'm going to try to revive this. |
superseded by #2467 |
(screenshots of changes w/ example
agent_portrayal
functions coming)Stuff like this is now possible:
plotnonfinite
_split_and_scatter
andportray