Set a custom cell in a given position.
(self, position, cell)
| 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.""" |
nothing calls this directly
no test coverage detected