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

Skip to content

Commit 9ef39d6

Browse files
committed
add test for axes keywords on colorbar()
1 parent bc9a3e7 commit 9ef39d6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/matplotlib/tests/test_colorbar.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,3 +306,12 @@ def test_colorbar_lognorm_extension():
306306
cb = ColorbarBase(ax, norm=LogNorm(vmin=0.1, vmax=1000.0),
307307
orientation='vertical', extend='both')
308308
assert cb._values[0] >= 0.0
309+
310+
311+
def test_colorbar_axes_kw():
312+
# test fix for #8493: This does only test, that axes-related keywords pass
313+
# and do not raise an exception.
314+
plt.figure()
315+
plt.imshow(([[1, 2], [3, 4]]))
316+
plt.colorbar(orientation='horizontal', fraction=0.2, pad=0.2, shrink=0.5,
317+
aspect=10, anchor=(0., 0.), panchor=(0., 1.))

0 commit comments

Comments
 (0)