Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix table.Cell docstrings. #17029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions lib/matplotlib/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,9 @@ class Cell(Rectangle):
"""
A cell is a `.Rectangle` with some associated `.Text`.

.. note:
As a user, you'll most likely not creates cells yourself. Instead, you
should use either the `~matplotlib.table.table` factory function or
`.Table.add_cell`.

Parameters
----------
xy : 2-tuple
The position of the bottom left corner of the cell.
width : float
The cell width.
height : float
The cell height.
edgecolor : color
The color of the cell border.
facecolor : color
The cell facecolor.
fill : bool
Whether the cell background is filled.
text : str
The cell text.
loc : {'left', 'center', 'right'}, default: 'right'
The alignment of the text within the cell.
fontproperties : dict
A dict defining the font properties of the text. Supported keys and
values are the keyword arguments accepted by `.FontProperties`.
As a user, you'll most likely not creates cells yourself. Instead, you
should use either the `~matplotlib.table.table` factory function or
`.Table.add_cell`.
"""

PAD = 0.1
Expand All @@ -69,6 +46,29 @@ def __init__(self, xy, width, height,
loc=None,
fontproperties=None
):
"""
Parameters
----------
xy : 2-tuple
The position of the bottom left corner of the cell.
width : float
The cell width.
height : float
The cell height.
edgecolor : color
The color of the cell border.
facecolor : color
The cell facecolor.
fill : bool
Whether the cell background is filled.
text : str
The cell text.
loc : {'left', 'center', 'right'}, default: 'right'
The alignment of the text within the cell.
fontproperties : dict
A dict defining the font properties of the text. Supported keys and
values are the keyword arguments accepted by `.FontProperties`.
"""

# Call base
Rectangle.__init__(self, xy, width=width, height=height, fill=fill,
Expand Down