A table of cells. .. note:: ``table()`` has some fundamental design limitations and will not be developed further. If you need more functionality, consider `blume `__. The table consists of a grid of cells, which are indexed b
| 237 | |
| 238 | |
| 239 | class Table(Artist): |
| 240 | """ |
| 241 | A table of cells. |
| 242 | |
| 243 | .. note:: |
| 244 | |
| 245 | ``table()`` has some fundamental design limitations and will not be |
| 246 | developed further. If you need more functionality, consider |
| 247 | `blume <https://github.com/swfiua/blume>`__. |
| 248 | |
| 249 | |
| 250 | The table consists of a grid of cells, which are indexed by (row, column). |
| 251 | |
| 252 | For a simple table, you'll have a full grid of cells with indices from |
| 253 | (0, 0) to (num_rows-1, num_cols-1), in which the cell (0, 0) is positioned |
| 254 | at the top left. However, you can also add cells with negative indices. |
| 255 | You don't have to add a cell to every grid position, so you can create |
| 256 | tables that have holes. |
| 257 | |
| 258 | *Note*: You'll usually not create an empty table from scratch. Instead use |
| 259 | `~matplotlib.table.table` to create a table from data. |
| 260 | """ |
| 261 | codes = {'best': 0, |
| 262 | 'upper right': 1, # default |
| 263 | 'upper left': 2, |
| 264 | 'lower left': 3, |
| 265 | 'lower right': 4, |
| 266 | 'center left': 5, |
| 267 | 'center right': 6, |
| 268 | 'lower center': 7, |
| 269 | 'upper center': 8, |
| 270 | 'center': 9, |
| 271 | 'top right': 10, |
| 272 | 'top left': 11, |
| 273 | 'bottom left': 12, |
| 274 | 'bottom right': 13, |
| 275 | 'right': 14, |
| 276 | 'left': 15, |
| 277 | 'top': 16, |
| 278 | 'bottom': 17, |
| 279 | } |
| 280 | """Possible values where to place the table relative to the Axes.""" |
| 281 | |
| 282 | FONTSIZE = 10 |
| 283 | |
| 284 | AXESPAD = 0.02 |
| 285 | """The border between the Axes and the table edge in Axes units.""" |
| 286 | |
| 287 | def __init__(self, ax, loc=None, bbox=None, **kwargs): |
| 288 | """ |
| 289 | Parameters |
| 290 | ---------- |
| 291 | ax : `~matplotlib.axes.Axes` |
| 292 | The `~.axes.Axes` to plot the table into. |
| 293 | loc : str, optional |
| 294 | The position of the cell with respect to *ax*. This must be one of |
| 295 | the `~.Table.codes`. |
| 296 | bbox : `.Bbox` or [xmin, ymin, width, height], optional |
no outgoing calls
searching dependent graphs…