@@ -42,48 +42,40 @@ def test_zorder():
42
42
)
43
43
plt .yticks ([])
44
44
45
- @image_comparison (baseline_images = ['table_row_label1' , 'table_row_label2' ,
46
- 'table_col_label1' , 'table_col_label2' ,
47
- 'table_plain' ],
45
+
46
+ @image_comparison (baseline_images = ['table_labels' ],
48
47
extensions = ['png' ])
49
48
def test_label_colours ():
50
49
dim = 3
51
-
50
+
52
51
c = np .linspace (0 , 1 , dim )
53
52
colours = plt .cm .RdYlGn (c )
54
53
cellText = [['1' ] * dim ] * dim
55
-
54
+
56
55
fig = plt .figure ()
57
- ax1 = fig .add_subplot (1 , 1 , 1 )
56
+
57
+ ax1 = fig .add_subplot (4 , 1 , 1 )
58
58
ax1 .axis ('off' )
59
59
ax1 .table (cellText = cellText ,
60
- rowColours = colours )
60
+ rowColours = colours ,
61
+ loc = 'best' )
61
62
62
- fig = plt .figure ()
63
- ax2 = fig .add_subplot (1 , 1 , 1 )
63
+ ax2 = fig .add_subplot (4 , 1 , 2 )
64
64
ax2 .axis ('off' )
65
65
ax2 .table (cellText = cellText ,
66
66
rowColours = colours ,
67
- rowLabels = ['Header' ] * dim )
67
+ rowLabels = ['Header' ] * dim ,
68
+ loc = 'best' )
68
69
69
- fig = plt .figure ()
70
- ax3 = fig .add_subplot (1 , 1 , 1 )
70
+ ax3 = fig .add_subplot (4 , 1 , 3 )
71
71
ax3 .axis ('off' )
72
72
ax3 .table (cellText = cellText ,
73
73
colColours = colours ,
74
74
loc = 'best' )
75
75
76
- fig = plt .figure ()
77
- ax4 = fig .add_subplot (1 , 1 , 1 )
76
+ ax4 = fig .add_subplot (4 , 1 , 4 )
78
77
ax4 .axis ('off' )
79
78
ax4 .table (cellText = cellText ,
80
79
colColours = colours ,
81
80
colLabels = ['Header' ] * dim ,
82
81
loc = 'best' )
83
-
84
- fig = plt .figure ()
85
- ax5 = fig .add_subplot (1 , 1 , 1 )
86
- ax5 .axis ('off' )
87
- ax5 .table (cellText = cellText ,
88
- loc = 'center' )
89
-
0 commit comments