Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 76851eb

Browse files
committed
fix gridspec bug that location is wrongly calculated for non-square grid
svn path=/branches/v1_0_maint/; revision=8667
1 parent cb5cab4 commit 76851eb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/matplotlib/gridspec.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ def __getitem__(self, key):
157157
col1, col2 = k2, k2+1
158158

159159

160-
num1 = row1*nrows + col1
161-
num2 = (row2-1)*nrows + (col2-1)
160+
num1 = row1*ncols + col1
161+
num2 = (row2-1)*ncols + (col2-1)
162162

163163
# single key
164164
else:

0 commit comments

Comments
 (0)