Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1a56221

Browse files
committed
Tables: Fix get_window_extent for table to allow table to be added to bbox_extra_artists.
The get_window_extent is a method on the cells not the key of the cells.
1 parent 4ed5a8c commit 1a56221

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/table.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,9 @@ def get_children(self):
279279

280280
def get_window_extent(self, renderer):
281281
'Return the bounding box of the table in window coords'
282-
boxes = [c.get_window_extent(renderer) for c in self._cells]
282+
boxes = [cell.get_window_extent(renderer)
283+
for cell in self._cells.values()]
284+
283285
return Bbox.union(boxes)
284286

285287
def _do_cell_alignment(self):

0 commit comments

Comments
 (0)