File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change 4
4
from matplotlib .externals import six
5
5
6
6
import matplotlib .pyplot as plt
7
- from matplotlib .testing .decorators import image_comparison
7
+ from matplotlib .testing .decorators import image_comparison , cleanup
8
+
8
9
from mpl_toolkits .axes_grid1 import make_axes_locatable
10
+ from mpl_toolkits .axes_grid1 import AxesGrid
11
+
12
+ from matplotlib .colors import LogNorm
13
+
9
14
import numpy as np
10
15
11
16
@@ -50,6 +55,23 @@ def test_divider_append_axes():
50
55
axHistleft .yaxis .set_ticklabels (())
51
56
axHistright .yaxis .set_ticklabels (())
52
57
58
+
59
+ @cleanup
60
+ def test_axesgrid_colorbar_log_smoketest ():
61
+ fig = plt .figure ()
62
+ grid = AxesGrid (fig , 111 , # modified to be only subplot
63
+ nrows_ncols = (1 , 1 ),
64
+ label_mode = "L" ,
65
+ cbar_location = "top" ,
66
+ cbar_mode = "single" ,
67
+ )
68
+
69
+ Z = 10000 * np .random .rand (10 , 10 )
70
+ im = grid [0 ].imshow (Z , interpolation = "nearest" , norm = LogNorm ())
71
+
72
+ grid .cbar_axes [0 ].colorbar (im )
73
+
74
+
53
75
if __name__ == '__main__' :
54
76
import nose
55
77
nose .runmodule (argv = ['-s' , '--with-doctest' ], exit = False )
You can’t perform that action at this time.
0 commit comments