@@ -42,48 +42,40 @@ def test_zorder():
4242 )
4343 plt .yticks ([])
4444
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' ],
4847 extensions = ['png' ])
4948def test_label_colours ():
5049 dim = 3
51-
50+
5251 c = np .linspace (0 , 1 , dim )
5352 colours = plt .cm .RdYlGn (c )
5453 cellText = [['1' ] * dim ] * dim
55-
54+
5655 fig = plt .figure ()
57- ax1 = fig .add_subplot (1 , 1 , 1 )
56+
57+ ax1 = fig .add_subplot (4 , 1 , 1 )
5858 ax1 .axis ('off' )
5959 ax1 .table (cellText = cellText ,
60- rowColours = colours )
60+ rowColours = colours ,
61+ loc = 'best' )
6162
62- fig = plt .figure ()
63- ax2 = fig .add_subplot (1 , 1 , 1 )
63+ ax2 = fig .add_subplot (4 , 1 , 2 )
6464 ax2 .axis ('off' )
6565 ax2 .table (cellText = cellText ,
6666 rowColours = colours ,
67- rowLabels = ['Header' ] * dim )
67+ rowLabels = ['Header' ] * dim ,
68+ loc = 'best' )
6869
69- fig = plt .figure ()
70- ax3 = fig .add_subplot (1 , 1 , 1 )
70+ ax3 = fig .add_subplot (4 , 1 , 3 )
7171 ax3 .axis ('off' )
7272 ax3 .table (cellText = cellText ,
7373 colColours = colours ,
7474 loc = 'best' )
7575
76- fig = plt .figure ()
77- ax4 = fig .add_subplot (1 , 1 , 1 )
76+ ax4 = fig .add_subplot (4 , 1 , 4 )
7877 ax4 .axis ('off' )
7978 ax4 .table (cellText = cellText ,
8079 colColours = colours ,
8180 colLabels = ['Header' ] * dim ,
8281 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