-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Add streamplot axes method to plot streamlines
#664
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
687af18
Add `streamplot` axes method to plot streamlines
tonysyu 0657e73
Add improvements from Tom Flannaghan.
tonysyu a88f621
Fix bounds checking.
tonysyu 28a9e27
Remove `Terminated` exception.
tonysyu e6e977a
Remove OutOfBounds exception and factor out Euler step
tonysyu 3bf9f09
Move comments into docstring.
tonysyu 3144f6d
Adjust exponent of step-size correction to match method-order.
tonysyu 5632418
Fix error raised when trajectory lands on Nx or Ny.
tonysyu d60c9fc
Remove integrator parameter for streamplot
tonysyu 6f3053e
Add streamplot function to pyplot.
tonysyu 72abc5d
Fix streamplot to work with colorbar.
tonysyu b884fc8
Fix selection of arrow's linewidth and color
tonysyu 7d01052
Add support for masked arrays.
tonysyu 40dce9c
Change handling of masked arrays.
tonysyu 07553f0
Remove copyright notice.
tonysyu 3259d0a
Return collection of streamlines from `streamplot`.
tonysyu a98c543
Add example to plot streamplot with masked values.
tonysyu ed29d17
Fix issues raised by PhilipElson in PR #664.
tonysyu 398e8ec
Rename `valid_index` to `within_grid`.
tonysyu 8152811
Change type checks to calls to isinstance.
tonysyu 9c51448
Set default color and linewidth to None and use rc defaults.
tonysyu b77effe
Change streamplot to default to color in color_cycle.
tonysyu 6ca72da
Address JDH's PR comments
tonysyu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix bounds checking.
Checking that the coordinate less than the array Nx/Ny does not work when the coordinate is float (e.g. it can be between `Nx` and `Nx - 1`).
- Loading branch information
commit a88f621b7a186447a3cd3030798f06b56a17a2e2
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
Think this could be simplified to
0 <= xi <= self.nx - 1 and 0 <= yi <= self.ny - 1.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 thought the same thing, but since
xiandyican be float values,xiandyican be larger thenx-1andny-1but less thannxandny. I think the use of this function changed at some point so the namevalid_indexis misleading (since an index should be an integer). I'll probably change this in a future commit.