Skip to content

Commit 6e9bd81

Browse files
authored
Fix bug in shape assignment
shape returns first the y dimension, then the x dimension. The code had the order inverted
1 parent 9c98ab0 commit 6e9bd81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/streamplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ def _integrate_rk12(x0, y0, dmap, f, maxlength):
575575
dx2 = ds * 0.5 * (k1x + k2x)
576576
dy2 = ds * 0.5 * (k1y + k2y)
577577

578-
nx, ny = dmap.grid.shape
578+
ny, nx = dmap.grid.shape
579579
# Error is normalized to the axes coordinates
580580
error = np.hypot((dx2 - dx1) / (nx - 1), (dy2 - dy1) / (ny - 1))
581581

0 commit comments

Comments
 (0)