Skip to content

Commit 914b750

Browse files
committed
FIX
1 parent 5a5d1bb commit 914b750

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/matplotlib/colorbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def draw(self, renderer):
231231

232232
class _ColorbarAxesLocator:
233233
"""
234-
Shrink the axes if there triangular or rectangular extends.
234+
Shrink the axes if there are triangular or rectangular extends.
235235
"""
236236
def __init__(self, cbar):
237237
self._cbar = cbar

lib/matplotlib/tests/test_colorbar.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -789,10 +789,10 @@ def test_aspects():
789789
extends = ['neither', 'both', 'both']
790790
cb = [[None, None, None], [None, None, None]]
791791
for nn, orient in enumerate(['vertical', 'horizontal']):
792-
for mm in range(3):
792+
for mm, (aspect, extend) in enumerate(zip(aspects, extends)):
793793
pc = ax[mm, nn].pcolormesh(np.arange(100).reshape(10, 10))
794794
cb[nn][mm] = fig.colorbar(pc, ax=ax[mm, nn], orientation=orient,
795-
aspect=aspects[mm], extend=extends[mm])
795+
aspect=aspect, extend=extend)
796796
fig.draw_no_output()
797797
# check the extends are right ratio:
798798
np.testing.assert_almost_equal(cb[0][1].ax.get_position().height,

0 commit comments

Comments
 (0)