You are reading an old version of the documentation (v3.0.0). For the latest version see https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.table.html
Version 3.0.0
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
animated bool
clip_box Bbox
clip_on bool
clip_path [(Path, Transform) | Patch | None]
contains callable
figure Figure
fontsize float
gid str
in_layout bool
label object
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool or None
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible bool
zorder float

Examples using matplotlib.pyplot.table