-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add norm
parameter to streamplot
.
#849
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
Conversation
Also, fixed/enhanced some docstrings.
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 |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.