There was an error while loading. Please reload this page.
1 parent 5a5d1bb commit f0ca1e0Copy full SHA for f0ca1e0
2 files changed
lib/matplotlib/colorbar.py
@@ -231,7 +231,7 @@ def draw(self, renderer):
231
232
class _ColorbarAxesLocator:
233
"""
234
- Shrink the axes if there triangular or rectangular extends.
+ Shrink the axes if there are triangular or rectangular extends.
235
236
def __init__(self, cbar):
237
self._cbar = cbar
lib/matplotlib/tests/test_colorbar.py
@@ -789,10 +789,10 @@ def test_aspects():
789
extends = ['neither', 'both', 'both']
790
cb = [[None, None, None], [None, None, None]]
791
for nn, orient in enumerate(['vertical', 'horizontal']):
792
- for mm in range(3):
+ for mm (aspect, extend) in enumerate(zip(aspects, extends)):
793
pc = ax[mm, nn].pcolormesh(np.arange(100).reshape(10, 10))
794
cb[nn][mm] = fig.colorbar(pc, ax=ax[mm, nn], orientation=orient,
795
- aspect=aspects[mm], extend=extends[mm])
+ aspect=aspect, extend=extend)
796
fig.draw_no_output()
797
# check the extends are right ratio:
798
np.testing.assert_almost_equal(cb[0][1].ax.get_position().height,
0 commit comments