@@ -129,10 +129,10 @@ def test_auto_column():
129
129
fig = plt .figure ()
130
130
131
131
#iteratble list input
132
- ax1 = fig .add_subplot (3 , 1 , 1 )
132
+ ax1 = fig .add_subplot (4 , 1 , 1 )
133
133
ax1 .axis ('off' )
134
134
tb1 = ax1 .table (cellText = [['Fit Text' , 2 ],
135
- ['Longer text than default' , 1 ]],
135
+ ['very long long text, Longer text than default' , 1 ]],
136
136
rowLabels = ["A" , "B" ],
137
137
colLabels = ["Col1" , "Col2" ],
138
138
loc = "center" )
@@ -141,10 +141,10 @@ def test_auto_column():
141
141
tb1 .auto_set_column_width ([- 1 , 0 , 1 ])
142
142
143
143
#iteratble tuple input
144
- ax2 = fig .add_subplot (3 , 1 , 2 )
144
+ ax2 = fig .add_subplot (4 , 1 , 2 )
145
145
ax2 .axis ('off' )
146
146
tb2 = ax2 .table (cellText = [['Fit Text' , 2 ],
147
- ['Longer text than default' , 1 ]],
147
+ ['very long long text, Longer text than default' , 1 ]],
148
148
rowLabels = ["A" , "B" ],
149
149
colLabels = ["Col1" , "Col2" ],
150
150
loc = "center" )
@@ -153,10 +153,10 @@ def test_auto_column():
153
153
tb2 .auto_set_column_width ((- 1 , 0 , 1 ))
154
154
155
155
#3 single inputs
156
- ax3 = fig .add_subplot (3 , 1 , 3 )
156
+ ax3 = fig .add_subplot (4 , 1 , 3 )
157
157
ax3 .axis ('off' )
158
158
tb3 = ax3 .table (cellText = [['Fit Text' , 2 ],
159
- ['Longer text than default' , 1 ]],
159
+ ['very long long text, Longer text than default' , 1 ]],
160
160
rowLabels = ["A" , "B" ],
161
161
colLabels = ["Col1" , "Col2" ],
162
162
loc = "center" )
@@ -165,3 +165,15 @@ def test_auto_column():
165
165
tb3 .auto_set_column_width (- 1 )
166
166
tb3 .auto_set_column_width (0 )
167
167
tb3 .auto_set_column_width (1 )
168
+
169
+ #4 non integer interable input
170
+ ax4 = fig .add_subplot (4 , 1 , 4 )
171
+ ax4 .axis ('off' )
172
+ tb4 = ax4 .table (cellText = [['Fit Text' , 2 ],
173
+ ['very long long text, Longer text than default' , 1 ]],
174
+ rowLabels = ["A" , "B" ],
175
+ colLabels = ["Col1" , "Col2" ],
176
+ loc = "center" )
177
+ tb4 .auto_set_font_size (False )
178
+ tb4 .set_fontsize (12 )
179
+ tb4 .auto_set_column_width ("-101" )
0 commit comments