Changed the return type of streamplot to a container object #24388
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.
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.Container
I'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
ArtistAnimation
being 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
lines
orarrows
attribute.It seemed easiest to weave this in is by
StreamplotSet
StreamplotContainer
I 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?