You are reading an old version of the documentation (v2.2.3). For the latest version see https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.table.html
Version 2.2.3
matplotlib
Fork me on GitHub

Table Of Contents

matplotlib.pyplot.table

matplotlib.pyplot.table(**kwargs)[source]

Add a table to the current axes.

Call signature:

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)

Returns a matplotlib.table.Table instance. Either cellText or cellColours must be provided. For finer grained control over tables, use the Table class and add it to the axes with add_table().

Thanks to John Gill for providing the class and table.

kwargs control the Table properties:

Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha float (0.0 transparent through 1.0 opaque)
animated bool
clip_box a Bbox instance
clip_on bool
clip_path [(Path, Transform) | Patch | None]
contains a callable function
figure a Figure instance
fontsize a float in points
gid an id string
label object
path_effects AbstractPathEffect
picker [None | bool | float | callable]
rasterized bool or None
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url a url string
visible bool
zorder float

Examples using matplotlib.pyplot.table