GeezerVison is showing matplotlib.org — matplotlib.pyplot.table — Matplotlib 3.1.2 documentation
matplotlib.pyplot.table¶
-
matplotlib.pyplot.table(cellText=None, cellColours=None, cellLoc='right', colWidths=None, rowLabels=None, rowColours=None, rowLoc='left', colLabels=None, colColours=None, colLoc='center', loc='bottom', bbox=None, edges='closed', **kwargs)[source]¶
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.
| Parameters: |
- cellText : 2D list of str, optional
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.
- cellColours : 2D list of matplotlib color specs, optional
The background colors of the cells.
- cellLoc : {'left', 'center', 'right'}, default: 'right'
The alignment of the text within the cells.
- colWidths : list of float, optional
The column widths in units of the axes. If not given, all columns will
have a width of 1 / ncols.
- rowLabels : list of str, optional
The text of the row header cells.
- rowColours : list of matplotlib color specs, optional
The colors of the row header cells.
- rowLoc : {'left', 'center', 'right'}, optional, default: 'left'
The text alignment of the row header cells.
- colLabels : list of str, optional
The text of the column header cells.
- colColours : list of matplotlib color specs, optional
The colors of the column header cells.
- colLoc : {'left', 'center', 'right'}, optional, default: 'left'
The text alignment of the column header cells.
- loc : str, optional
The position of the cell with respect to ax. This must be one of
the codes.
- bbox :
Bbox, optional
A bounding box to draw the table into. If this is not None, this
overrides loc.
- edges : substring of 'BRTL' or {'open', 'closed', 'horizontal', 'vertical'}
The cell edges to be drawn with a line. See also
visible_edges.
|
| Returns: |
- table :
Table
The created table.
|
| Other Parameters: |
- **kwargs
Table properties.
|
Examples using matplotlib.pyplot.table¶
© Copyright 2002 - 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 2012 - 2018 The Matplotlib development team.
Last updated on Jan 05, 2020.
Created using
Sphinx 1.8.5.
Doc version v3.1.1-79-g90d53b526.
|