MCPcopy
hub / github.com/matplotlib/matplotlib / _get_grid_bbox

Method _get_grid_bbox

lib/matplotlib/table.py:425–435  ·  view source on GitHub ↗

Get a bbox, in axes coordinates for the cells. Only include those in the range (0, 0) to (maxRow, maxCol).

(self, renderer)

Source from the content-addressed store, hash-verified

423 self.stale = False
424
425 def _get_grid_bbox(self, renderer):
426 """
427 Get a bbox, in axes coordinates for the cells.
428
429 Only include those in the range (0, 0) to (maxRow, maxCol).
430 """
431 boxes = [cell.get_window_extent(renderer)
432 for (row, col), cell in self._cells.items()
433 if row >= 0 and col >= 0]
434 bbox = Bbox.union(boxes)
435 return bbox.transformed(self.get_transform().inverted())
436
437 def contains(self, mouseevent):
438 # docstring inherited

Callers 1

_update_positionsMethod · 0.95

Calls 5

unionMethod · 0.80
get_window_extentMethod · 0.45
transformedMethod · 0.45
invertedMethod · 0.45
get_transformMethod · 0.45

Tested by

no test coverage detected