MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / __setitem__

Method __setitem__

site-packages/matplotlib/table.py:290–304  ·  view source on GitHub ↗

Set a custom cell in a given position.

(self, position, cell)

Source from the content-addressed store, hash-verified

288 return cell
289
290 def __setitem__(self, position, cell):
291 """
292 Set a custom cell in a given position.
293 """
294 if not isinstance(cell, CustomCell):
295 raise TypeError('Table only accepts CustomCell')
296 try:
297 row, col = position[0], position[1]
298 except Exception:
299 raise KeyError('Only tuples length 2 are accepted as coordinates')
300 cell.set_figure(self.figure)
301 cell.set_transform(self.get_transform())
302 cell.set_clip_on(False)
303 self._cells[row, col] = cell
304 self.stale = True
305
306 def __getitem__(self, position):
307 """

Callers 2

_undo_trajectoryMethod · 0.45
pyplot.pyFile · 0.45

Calls 4

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

Tested by

no test coverage detected