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

Skip to content

Commit 1a158bb

Browse files
committed
Fix colorbar edge-drawing bug introduced in previous commit today.
svn path=/trunk/matplotlib/; revision=2509
1 parent 01f43da commit 1a158bb

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

lib/matplotlib/colorbar.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,14 +216,12 @@ def _edges(self, X, Y):
216216
Return the separator line segments; helper for _add_solids.
217217
'''
218218
N = nx.shape(X)[0]
219+
# Using the non-array form of these line segments is much
220+
# simpler than making them into arrays.
219221
if self.orientation == 'vertical':
220-
return nx.concatenate((X[1:N-1, nx.newaxis],
221-
Y[1:N-1, nx.newaxis]), axis=1)
222-
#return [zip(X[i], Y[i]) for i in range(1, N-1)]
222+
return [zip(X[i], Y[i]) for i in range(1, N-1)]
223223
else:
224-
return nx.concatenate((Y[1:N-1, nx.newaxis],
225-
X[1:N-1, nx.newaxis]), axis=1)
226-
#return [zip(Y[i], X[i]) for i in range(1, N-1)]
224+
return [zip(Y[i], X[i]) for i in range(1, N-1)]
227225

228226
def _add_solids(self, X, Y, C):
229227
'''

0 commit comments

Comments
 (0)