Repository navigation
Conversation
Deprecated StreamplotSet Added StreamplotContainer
25ba160 to
833d45a
Compare
|
Discussed on call and .remove doesn't work b/c there's no remove method on collections, b/c that is apparently a hard problem, matplotlib/lib/matplotlib/artist.py Lines 230 to 234 in 04ce3e9 one that I think requires writing an iterator for collections, so uh putting this as a note for when I get back to this... ETA: Container should possibly be a dataclass instead of inheriting from tuple if the main reason it's inheriting from tuple is the named attributes. |
|
On a tangentially related point, I wonder whether we can stop using FancyArrowPatches (which are relatively complex) to draw the arrowheads in the streamplot (note that we don't even use them to draw arrow bodies...), and instead simply use markers with the appropriate rotation? (It would still have to be a PathCollection to support colormapping, but not a PatchCollection.) |
|
Since this Pull Request has not been updated in 60 days, it has been marked "inactive." This does not mean that it will be closed, though it may be moved to a "Draft" state. This helps maintainers prioritize their reviewing efforts. You can pick the PR back up anytime - please ping us if you need a review or guidance to move the PR forward! If you do not plan on continuing the work, please let us know so that we can either find someone to take the PR over, or close it. |
The idea of using a container object for streamplots was discussed in #803, but they settled on basically a lightweight datatype object. My reasoning for switching to a container was a combo of container providing a nicer
repl(kind of) and so that there would be more uniformity around artist return types cause the docs can all point to.ContainerI'm sort of concerned that no tests seem to fail given the discussion in the original PR is that containers don't play well with scalar mappables, but that could be due to changes in how container was implemented?
This came up cause of the discussion in #24274 around good examples for
ArtistAnimationbeing the artists that return containers or contourset. Looking at contourset, that seemed very specialized and like it made more sense to think of this like the containers and maybe build out to support some of the other things mentioned in the note for this method.The actual change is super lightweight since it's switching one named tuple for the other, which means anyone currently relying on a StreamplotSet object doesn't lose the
linesorarrowsattribute.It seemed easiest to weave this in is by
StreamplotSetStreamplotContainerI didn't write up a whats new or api_change 'cause I know this needs to be discussed first.
Eta: @efiring what sorta information did you want this container to hold?