Add a table to an Axes
.
At least one of cellText or cellColours must be specified. These parameters must be 2D lists, in which the outer lists define the rows and the inner list define the column values per row. Each row must have the same number of elements.
The table can optionally have row and column headers, which are configured using rowLabels, rowColours, rowLoc and colLabels, colColours, colLoc respectively.
For finer grained control over tables, use the Table
class and add it to the axes with Axes.add_table
.
The texts to place into the table cells.
Note: Line breaks in the strings are currently not accounted for and will result in the text exceeding the cell boundaries.
The background colors of the cells.
The alignment of the text within the cells.
The column widths in units of the axes. If not given, all columns will have a width of 1 / ncols.
The text of the row header cells.
The colors of the row header cells.
The text alignment of the row header cells.
The text of the column header cells.
The colors of the column header cells.
The text alignment of the column header cells.
The position of the cell with respect to ax. This must be one of the codes
.
Bbox
, optional
A bounding box to draw the table into. If this is not None, this overrides loc.
The cell edges to be drawn with a line. See also visible_edges
.
Table
The created table.
Table
properties.
Property | Description |
---|---|
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array | |
scalar or None | |
bool | |
bool | |
Patch or (Path, Transform) or None | |
float | |
str | |
bool | |
object | |
None or bool or float or callable | |
bool | |
(scale: float, length: float, randomness: float) | |
bool or None | |
str | |
bool | |
float |
© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.5.1/api/_as_gen/matplotlib.axes.Axes.table.html