From 1a562214788489bfadd2eb2df9c8e6c60f21ea39 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Sat, 20 Oct 2012 18:45:07 +0200 Subject: [PATCH] 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. --- lib/matplotlib/table.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/matplotlib/table.py b/lib/matplotlib/table.py index 9ae70c1c6fe4..b0036bc953c5 100644 --- a/lib/matplotlib/table.py +++ b/lib/matplotlib/table.py @@ -279,7 +279,9 @@ def get_children(self): def get_window_extent(self, renderer): 'Return the bounding box of the table in window coords' - boxes = [c.get_window_extent(renderer) for c in self._cells] + boxes = [cell.get_window_extent(renderer) + for cell in self._cells.values()] + return Bbox.union(boxes) def _do_cell_alignment(self):