10000 Merge pull request #19172 from ufmayer/master · matplotlib/matplotlib@28efb11 · GitHub
[go: up one dir, main page]

Skip to content

Commit 28efb11

Browse files
authored
Merge pull request #19172 from ufmayer/master
Fix 3D surface example bug for non-square grid
2 parents a8b79bb + cd9cc10 commit 28efb11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/mplot3d/surface3d_3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
colors = np.empty(X.shape, dtype=str)
2929
for y in range(ylen):
3030
for x in range(xlen):
31-
colors[x, y] = colortuple[(x + y) % len(colortuple)]
31+
colors[y, x] = colortuple[(x + y) % len(colortuple)]
3232

3333
# Plot the surface with face colors taken from the array we made.
3434
surf = ax.plot_surface(X, Y, Z, facecolors=colors, linewidth=0)

0 commit comments

Comments
 (0)
0