Skip to content
Next Next commit
bug fix related #5479
  • Loading branch information
ryanbelt committed Feb 22, 2016
commit ced77e42e13611cf8dc4023c0ddbfcade7d5d419
8 changes: 7 additions & 1 deletion lib/matplotlib/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,13 @@ def _do_cell_alignment(self):

def auto_set_column_width(self, col):

self._autoColumns.append(col)
# col is a list of column index
if isinstance(col, list):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably better to do as

try:
    self._autoColumns.extend(cell)
except CORRECT_EXCEPTION:
    self._autoColumns.append(col)

for cell in col:
self._autoColumns.append(cell)
# col is just an index
else:
self._autoColumns.append(col)
self.stale = True

def _auto_set_column_width(self, col, renderer):
Expand Down