Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix streamplot for non-square grids.#789

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
efiring merged 1 commit intomatplotlib:masterfromtonysyu:fix-streamplot
Apr 16, 2012
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletionslib/matplotlib/streamplot.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,7 +5,6 @@
import numpy as np
import matplotlib
import matplotlib.patches as patches
import matplotlib.cbook as cbook


__all__ = ['streamplot']
Expand DownExpand Up@@ -332,9 +331,11 @@ def backward_time(xi, yi):
return -dxi, -dyi

def integrate(x0, y0):
"""Return x, y coordinates of trajectory based on starting point.
"""Return x, y grid-coordinates of trajectory based on starting point.

Integrate both forward and backward in time from starting point in
grid coordinates.

Integrate both forward and backward in time from starting point.
Integration is terminated when a trajectory reaches a domain boundary
or when it crosses into an already occupied cell in the StreamMask. The
resulting trajectory is None if it is shorter than `minlength`.
Expand DownExpand Up@@ -446,10 +447,10 @@ def _integrate_rk12(x0, y0, dmap, f):

def _euler_step(xf_traj, yf_traj, dmap, f):
"""Simple Euler integration step."""
nx, ny = dmap.grid.shape
ny, nx = dmap.grid.shape
xi = xf_traj[-1]
yi = yf_traj[-1]
cx, cy = f(xi, yi) # ds.cx is in data coordinates, ds in axis coord.
cx, cy = f(xi, yi)
if cx > 0:
dsx = (nx - 1 - xi) / cx
else:
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp