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

Skip to content

Commit b30618c

Browse files
committed
Merge branch 'fix-legend-loc' of https://github.com/alanlau28/matplotlib into fix-legend-loc
2 parents 86fb32a + c33aa8c commit b30618c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/tests/test_legend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,12 +1417,12 @@ def test_legend_text():
14171417
# position for 'best' when there is text in figure
14181418
fig, axs = plt.subplots(ncols=2, figsize=(10, 5))
14191419
leg_bboxes = []
1420-
for ax, ht in zip(axs.flat, ('best', 'lower left')):
1420+
for ax, loc in zip(axs.flat, ('best', 'lower left')):
14211421
x = [1, 2]
14221422
y = [2, 1]
14231423
ax.plot(x, y, label='plot name')
14241424
ax.text(1.5, 2, 'some text blahblah', verticalalignment='top')
1425-
leg = ax.legend(loc=ht)
1425+
leg = ax.legend(loc=loc)
14261426
fig.canvas.draw()
14271427
leg_bboxes.append(
14281428
leg.get_window_extent().transformed(ax.transAxes.inverted()))

0 commit comments

Comments
 (0)