@@ -493,10 +493,10 @@ def test_colorbar_autotickslog():
493
493
orientation = 'vertical' , shrink = 0.4 )
494
494
# note only -12 to +12 are visible
495
495
np .testing .assert_almost_equal (cbar .ax .yaxis .get_ticklocs (),
496
- 10 ** np .arange (- 16 . , 16 .2 , 4. ))
497
- # note only -24 to +24 are visible
496
+ 10 ** np .arange (- 12 . , 12 .2 , 4. ))
497
+ # note only -12 to +12 are visible
498
498
np .testing .assert_almost_equal (cbar2 .ax .yaxis .get_ticklocs (),
499
- 10 ** np .arange (- 24 . , 25 . , 12. ))
499
+ 10 ** np .arange (- 12 . , 13 . , 12. ))
500
500
501
501
502
502
def test_colorbar_get_ticks ():
@@ -584,6 +584,7 @@ def test_colorbar_log_minortick_labels():
584
584
def test_colorbar_renorm ():
585
585
x , y = np .ogrid [- 4 :4 :31j , - 4 :4 :31j ]
586
586
z = 120000 * np .exp (- x ** 2 - y ** 2 )
587
+ # min/max of z vals is 1.5196998658913011e-09, 120000.0
587
588
588
589
fig , ax = plt .subplots ()
589
590
im = ax .imshow (z )
@@ -597,7 +598,7 @@ def test_colorbar_renorm():
597
598
norm = LogNorm (z .min (), z .max ())
598
599
im .set_norm (norm )
599
600
np .testing .assert_allclose (cbar .ax .yaxis .get_majorticklocs (),
600
- np .logspace (- 10 , 7 , 18 ))
601
+ np .logspace (- 9 , 6 , 16 ))
601
602
# note that set_norm removes the FixedLocator...
602
603
assert np .isclose (cbar .vmin , z .min ())
603
604
cbar .set_ticks ([1 , 2 , 3 ])
@@ -616,6 +617,7 @@ def test_colorbar_format(fmt):
616
617
# make sure that format is passed properly
617
618
x , y = np .ogrid [- 4 :4 :31j , - 4 :4 :31j ]
618
619
z = 120000 * np .exp (- x ** 2 - y ** 2 )
620
+ # min/max of z vals is 1.5196998658913011e-09, 120000.0
619
621
620
622
fig , ax = plt .subplots ()
621
623
im = ax .imshow (z )
@@ -633,7 +635,7 @@ def test_colorbar_format(fmt):
633
635
im .set_norm (LogNorm (vmin = 0.1 , vmax = 10 ))
634
636
fig .canvas .draw ()
635
637
assert (cbar .ax .yaxis .get_ticklabels ()[0 ].get_text () ==
636
- '$\\ mathdefault{10^{-2 }}$' )
638
+ '$\\ mathdefault{10^{-1 }}$' )
637
639
638
640
639
641
def test_colorbar_scale_reset ():
0 commit comments