@@ -129,10 +129,10 @@ def test_auto_column():
129129 fig = plt .figure ()
130130
131131 #iteratble list input
132- ax1 = fig .add_subplot (3 , 1 , 1 )
132+ ax1 = fig .add_subplot (4 , 1 , 1 )
133133 ax1 .axis ('off' )
134134 tb1 = ax1 .table (cellText = [['Fit Text' , 2 ],
135- ['Longer text than default' , 1 ]],
135+ ['very long long text, Longer text than default' , 1 ]],
136136 rowLabels = ["A" , "B" ],
137137 colLabels = ["Col1" , "Col2" ],
138138 loc = "center" )
@@ -141,10 +141,10 @@ def test_auto_column():
141141 tb1 .auto_set_column_width ([- 1 , 0 , 1 ])
142142
143143 #iteratble tuple input
144- ax2 = fig .add_subplot (3 , 1 , 2 )
144+ ax2 = fig .add_subplot (4 , 1 , 2 )
145145 ax2 .axis ('off' )
146146 tb2 = ax2 .table (cellText = [['Fit Text' , 2 ],
147- ['Longer text than default' , 1 ]],
147+ ['very long long text, Longer text than default' , 1 ]],
148148 rowLabels = ["A" , "B" ],
149149 colLabels = ["Col1" , "Col2" ],
150150 loc = "center" )
@@ -153,10 +153,10 @@ def test_auto_column():
153153 tb2 .auto_set_column_width ((- 1 , 0 , 1 ))
154154
155155 #3 single inputs
156- ax3 = fig .add_subplot (3 , 1 , 3 )
156+ ax3 = fig .add_subplot (4 , 1 , 3 )
157157 ax3 .axis ('off' )
158158 tb3 = ax3 .table (cellText = [['Fit Text' , 2 ],
159- ['Longer text than default' , 1 ]],
159+ ['very long long text, Longer text than default' , 1 ]],
160160 rowLabels = ["A" , "B" ],
161161 colLabels = ["Col1" , "Col2" ],
162162 loc = "center" )
@@ -165,3 +165,15 @@ def test_auto_column():
165165 tb3 .auto_set_column_width (- 1 )
166166 tb3 .auto_set_column_width (0 )
167167 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