Skip to content

Commit 389cf07

Browse files
committed
TST: test for add_lines working as expected
1 parent e0177bc commit 389cf07

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
96.7 KB
Loading

lib/matplotlib/tests/test_contour.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,3 +401,16 @@ def test_contourf_log_extension():
401401
plt.colorbar(c1, ax=ax1)
402402
plt.colorbar(c2, ax=ax2)
403403
plt.colorbar(c3, ax=ax3)
404+
405+
406+
@image_comparison(baseline_images=['contour_addlines'],
407+
extensions=['png'], remove_text=True, style='mpl20')
408+
def test_contour_addlines():
409+
fig, ax = plt.subplots()
410+
np.random.seed(19680812)
411+
X = np.random.rand(10, 10)*10000
412+
pcm = ax.pcolormesh(X)
413+
# add 1000 to make colors visible...
414+
cont = ax.contour(X+1000)
415+
cb = fig.colorbar(pcm)
416+
cb.add_lines(cont)

0 commit comments

Comments
 (0)