Skip to content

Commit a0cea21

Browse files
r03ert0QuLogic
authored andcommitted
Fix bug in shape assignment
shape returns first the y dimension, then the x dimension. The code had the order inverted
1 parent 3a4fdea commit a0cea21

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
@@ -570,7 +570,7 @@ def _integrate_rk12(x0, y0, dmap, f, maxlength):
570570
dx2 = ds * 0.5 * (k1x + k2x)
571571
dy2 = ds * 0.5 * (k1y + k2y)
572572

573-
nx, ny = dmap.grid.shape
573+
ny, nx = dmap.grid.shape
574574
# Error is normalized to the axes coordinates
575575
error = np.hypot((dx2 - dx1) / (nx - 1), (dy2 - dy1) / (ny - 1))
576576

0 commit comments

Comments
 (0)