Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e0cce5c

Browse filesBrowse files
committed
Fix table.Cell docstrings.
- Previously the "note" would be treated as a comment (it needs *two* end colons); we can just make it plain text anyways. - Moving the doc for the parameters to `__init__` avoids `__init__` inheriting the docstring of the parent `Rectangle.__init__` and thus the rendered docs getting two copies of the parameter list, with only one being correct.
1 parent 98dff87 commit e0cce5c
Copy full SHA for e0cce5c

File tree

Expand file treeCollapse file tree

1 file changed

+26
-26
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+26
-26
lines changed

‎lib/matplotlib/table.py

Copy file name to clipboardExpand all lines: lib/matplotlib/table.py
+26-26Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -31,32 +31,9 @@ class Cell(Rectangle):
3131
"""
3232
A cell is a `.Rectangle` with some associated `.Text`.
3333
34-
.. note:
35-
As a user, you'll most likely not creates cells yourself. Instead, you
36-
should use either the `~matplotlib.table.table` factory function or
37-
`.Table.add_cell`.
38-
39-
Parameters
40-
----------
41-
xy : 2-tuple
42-
The position of the bottom left corner of the cell.
43-
width : float
44-
The cell width.
45-
height : float
46-
The cell height.
47-
edgecolor : color
48-
The color of the cell border.
49-
facecolor : color
50-
The cell facecolor.
51-
fill : bool
52-
Whether the cell background is filled.
53-
text : str
54-
The cell text.
55-
loc : {'left', 'center', 'right'}, default: 'right'
56-
The alignment of the text within the cell.
57-
fontproperties : dict
58-
A dict defining the font properties of the text. Supported keys and
59-
values are the keyword arguments accepted by `.FontProperties`.
34+
As a user, you'll most likely not creates cells yourself. Instead, you
35+
should use either the `~matplotlib.table.table` factory function or
36+
`.Table.add_cell`.
6037
"""
6138

6239
PAD = 0.1
@@ -69,6 +46,29 @@ def __init__(self, xy, width, height,
6946
loc=None,
7047
fontproperties=None
7148
):
49+
"""
50+
Parameters
51+
----------
52+
xy : 2-tuple
53+
The position of the bottom left corner of the cell.
54+
width : float
55+
The cell width.
56+
height : float
57+
The cell height.
58+
edgecolor : color
59+
The color of the cell border.
60+
facecolor : color
61+
The cell facecolor.
62+
fill : bool
63+
Whether the cell background is filled.
64+
text : str
65+
The cell text.
66+
loc : {'left', 'center', 'right'}, default: 'right'
67+
The alignment of the text within the cell.
68+
fontproperties : dict
69+
A dict defining the font properties of the text. Supported keys and
70+
values are the keyword arguments accepted by `.FontProperties`.
71+
"""
7272

7373
# Call base
7474
Rectangle.__init__(self, xy, width=width, height=height, fill=fill,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.