Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Sensibilisation à
l'Intelligence Artificielle
Voir le programme détaillé
Classe « Axes »

Méthode matplotlib.pyplot.Axes.table

Signature de la méthode table

def table(ax, 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) 

Description

help(Axes.table)

Add a table to an `~.axes.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 or pandas.DataFrame, 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 :mpltype:`color`, optional
    The background colors of the cells.

cellLoc : {'right', 'center', 'left'}
    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 :mpltype:`color`, optional
    The colors of the row header cells.

rowLoc : {'left', 'center', 'right'}
    The text alignment of the row header cells.

colLabels : list of str, optional
    The text of the column header cells.

colColours : list of :mpltype:`color`, optional
    The colors of the column header cells.

colLoc : {'center', 'left', 'right'}
    The text alignment of the column header cells.

loc : str, default: 'bottom'
    The position of the cell with respect to *ax*. This must be one of
    the `~.Table.codes`.

bbox : `.Bbox` or [xmin, ymin, width, height], optional
    A bounding box to draw the table into. If this is not *None*, this
    overrides *loc*.

edges : {'closed', 'open', 'horizontal', 'vertical'} or substring of 'BRTL'
    The cell edges to be drawn with a line. See also
    `~.Cell.visible_edges`.

Returns
-------
`~matplotlib.table.Table`
    The created table.

Other Parameters
----------------
**kwargs
    `.Table` properties.

Properties:
    agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image
    alpha: scalar or None
    animated: bool
    clip_box: `~matplotlib.transforms.BboxBase` or None
    clip_on: bool
    clip_path: Patch or (Path, Transform) or None
    figure: `~matplotlib.figure.Figure` or `~matplotlib.figure.SubFigure`
    fontsize: float
    gid: str
    in_layout: bool
    label: object
    mouseover: bool
    path_effects: list of `.AbstractPathEffect`
    picker: None or bool or float or callable
    rasterized: bool
    sketch_params: (scale: float, length: float, randomness: float)
    snap: bool or None
    transform: `~matplotlib.transforms.Transform`
    url: str
    visible: bool
    zorder: float


Vous êtes un professionnel et vous avez besoin d'une formation ? Mise en oeuvre d'IHM
avec Qt et PySide6
Voir le programme détaillé