Skip to content

Commit 56cb141

Browse files
committed
Cleanup lognorm colorbar test
1 parent a311b96 commit 56cb141

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/tests/test_colorbar.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -328,11 +328,12 @@ def test_colorbar_get_ticks():
328328
@cleanup
329329
def test_colorbar_lognorm_extension():
330330
# Test that colorbar with lognorm is extended correctly
331-
ax = plt.gca()
331+
f, ax = plt.subplots()
332332
cb = ColorbarBase(ax, norm=LogNorm(vmin=0.1, vmax=1000.0),
333333
orientation='vertical', extend='both')
334334
assert cb._values[0] >= 0.0
335335

336+
336337
if __name__ == '__main__':
337338
import nose
338339
nose.runmodule(argv=['-s', '--with-doctest'], exit=False)

0 commit comments

Comments
 (0)