-
Notifications
You must be signed in to change notification settings - Fork 365
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 the styler keyword to allow on-demand / callback to determine styling of geometries in the matplotlib interface. #1019
Conversation
85022f5
to
43a3f63
Compare
callbacks make for an API difference compared to MPL, is there any specific advantage for them. For my use case, callbacks would not work because the decisions on the parameter values happen somewhere in an elaborate pipeline before the calls to |
It means we can style a feature that may not yet have all of the geometries to hand. For example, some features can return different geometries based on the zoom level.
That form would still work (untested):
If you really dislike that solution, I'd be supportive of creating a GeometryCollection object that follows the same interface as the PathCollection one. Namely:
But I don't want to bleed in index information into Features because they are inherently limited to a fixed number of geometries. |
That solution would work, but indeed it is not friendly. If I had not been aware of the underlying issue, it would be mysterious. It requires a little too much context to fully understand. Also, it is probably of little consequence (as geometry lengths tend to be small) but that lookup is On the other hand, inspired by that code #910 could altered to take the index stuff out of the features, so that the fix is self contained, but having the As such, a |
1c508d3
to
0a094a3
Compare
1a8f35d
to
f33d4aa
Compare
f33d4aa
to
f204dfb
Compare
…tyling of geometries in the matplotlib interface.
f204dfb
to
a096873
Compare
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.
Looks fine to me. @pelson you still feel good about this one?
Sure do. If you are at hand, please feel free to merge at will. I'm going to build something on top of this change now, and when I'm done I'll merge (if you haven't beaten me to it) before opening a new PR. |
Actually, given how old the branch is, building something on top of it is a pretty bad idea, so I'm going to merge this and move on. |
🤣 - man, you're fast! |
Had just opened the issue when you commented. 😁 |
Replaces #910. Closes #580.