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

Skip to content

Commit 8d5cac2

Browse files
committed
TST: test that positioning works correctly
1 parent 76c30e4 commit 8d5cac2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/mpl_toolkits/tests/test_axes_grid1.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,3 +380,12 @@ def test_anchored_direction_arrows_many_args():
380380
sep_x=-0.06, sep_y=-0.08, back_length=0.1, head_width=9,
381381
head_length=10, tail_width=5)
382382
ax.add_artist(direction_arrows)
383+
384+
385+
def test_axes_locatable_position():
386+
fig, ax = plt.subplots()
387+
divider = make_axes_locatable(ax)
388+
cax = divider.append_axes('right', size='5%', pad='2%')
389+
fig.canvas.draw()
390+
assert np.isclose(cax.get_position(original=False).width,
391+
0.03621495327102808)

0 commit comments

Comments
 (0)