8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b3ea96 commit 6d7c885Copy full SHA for 6d7c885
lib/matplotlib/tests/baseline_images/test_contour/contour_uneven.png
6.03 KB
lib/matplotlib/tests/test_contour.py
@@ -403,7 +403,6 @@ def test_contourf_log_extension():
403
cb = plt.colorbar(c2, ax=ax2)
404
assert cb.ax.get_ylim() == (1e-4, 1e6)
405
cb = plt.colorbar(c3, ax=ax3)
406
- print(cb.ax.get_ylim())
407
assert_array_almost_equal(cb.ax.get_ylim(),
408
[3.162277660168379e-05, 3162277.660168383], 2)
409
@@ -423,3 +422,16 @@ def test_contour_addlines():
423
422
cb = fig.colorbar(pcm)
424
cb.add_lines(cont)
425
assert_array_almost_equal(cb.ax.get_ylim(), [114.3091, 9972.30735], 3)
+
426
427
+@image_comparison(baseline_images=['contour_uneven'],
428
+ extensions=['png'], remove_text=True, style='mpl20')
429
+def test_contour_uneven():
430
+ z = np.arange(24).reshape(4, 6)
431
+ fig, axs = plt.subplots(1, 2)
432
+ ax = axs[0]
433
+ cs = ax.contourf(z, levels=[2, 4, 6, 10, 20])
434
+ fig.colorbar(cs, ax=ax, spacing='proportional')
435
+ ax = axs[1]
436
437
+ fig.colorbar(cs, ax=ax, spacing='uniform')
0 commit comments