10000
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 1376c96 commit 982616cCopy full SHA for 982616c
lib/matplotlib/tests/test_contour.py
@@ -398,9 +398,14 @@ def test_contourf_log_extension():
398
c3 = ax3.contourf(data, levels=levels,
399
norm=LogNorm(vmin=levels.min(), vmax=levels.max()),
400
extend='both')
401
- plt.colorbar(c1, ax=ax1)
402
- plt.colorbar(c2, ax=ax2)
403
- plt.colorbar(c3, ax=ax3)
+ cb = plt.colorbar(c1, ax=ax1)
+ assert cb.ax.get_ylim() == (1e-8, 1e10)
+ 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
410
411
@image_comparison(baseline_images=['contour_addlines'],
@@ -414,3 +419,4 @@ def test_contour_addlines():
414
419
cont = ax.contour(X+1000)
415
420
cb = fig.colorbar(pcm)
416
421
cb.add_lines(cont)
422
+ assert_array_almost_equal(cb.ax.get_ylim(), [114.3091, 9972.30735], 3)
0 commit comments