MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / __setitem__

Method __setitem__

lib/matplotlib/table.py:355–369  ·  view source on GitHub ↗

Set a custom cell in a given position.

(self, position, cell)

Source from the content-addressed store, hash-verified

353 return cell
354
355 def __setitem__(self, position, cell):
356 """
357 Set a custom cell in a given position.
358 """
359 _api.check_isinstance(Cell, cell=cell)
360 try:
361 row, col = position[0], position[1]
362 except Exception as err:
363 raise KeyError('Only tuples length 2 are accepted as '
364 'coordinates') from err
365 cell.set_figure(self.get_figure(root=False))
366 cell.set_transform(self.get_transform())
367 cell.set_clip_on(False)
368 self._cells[row, col] = cell
369 self.stale = True
370
371 def __getitem__(self, position):
372 """Retrieve a custom cell from a given position."""

Callers

nothing calls this directly

Calls 5

set_figureMethod · 0.45
get_figureMethod · 0.45
set_transformMethod · 0.45
get_transformMethod · 0.45
set_clip_onMethod · 0.45

Tested by

no test coverage detected