Repository navigation
Add norm parameter to streamplot. - #849
Conversation
Also, fixed/enhanced some docstrings.
There was a problem hiding this comment.
Why not prepare for future changes by simply returning a one-element list? Future revisions could then have the arrow patches as the next item in the list without breaking anyone existing code?
There was a problem hiding this comment.
I'm not actually sure what the future return value will look like. A two-item list sounds a bit like what I implemented in PR #803, but @efiring suggested a different approach---possibly using the Container class. Based on the subclasses in matplotlib.container, it seems a Container-based return value may look (to the user) like a one-element tuple. Is that correct?
There was a problem hiding this comment.
On Fri, Apr 27, 2012 at 1:42 PM, Benjamin Root
reply@reply.github.com
wrote:
Line collection with all streamlines as a series of line segments.
Currently, there is no way to differentiate between line segments
on different streamlines (other than manually checking that segments
- are connected).
- are connected). NOTE: this return value is likely to change since it
Why not prepare for future changes by simply returning a one-element list? Future revisions could then have the arrow patches as the next item in the list without breaking anyone existing code?
Because I don't think a list is the way to go for complex objects like
this. Better to return an instance of a class.
Eric
Reply to this email directly or view it on GitHub:
https://github.com/matplotlib/matplotlib/pull/849/files#r744390
|
Except for that one point, everything else looks good. |
|
I just removed the note about the return value of streamplot, and I'll try to address that issue in PR #803. |
|
I think that is much better. It is a good rule of thumb to keep PR's focused on a single issue at a time. I say this is ready to be pulled in. |
Add `norm` parameter to `streamplot`.
As suggested by @efiring: "when a cmap kwarg is allowed, a norm kwarg should also be allowed."
Also, fixed/enhanced some docstrings.