[sprint] forward keyword args though table by mrterry · Pull Request #2167 · matplotlib/matplotlib · GitHub
Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions lib/matplotlib/__init__.py
8 changes: 5 additions & 3 deletions lib/matplotlib/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class Table(Artist):
FONTSIZE = 10
AXESPAD = 0.02 # the border between the axes and table edge

def __init__(self, ax, loc=None, bbox=None):
def __init__(self, ax, loc=None, bbox=None, **kwargs):

Artist.__init__(self)

Expand All @@ -201,6 +201,7 @@ def __init__(self, ax, loc=None, bbox=None):
self._autoRows = []
self._autoColumns = []
self._autoFontsize = True
self.update(kwargs)

self.set_clip_on(False)

Expand Down Expand Up @@ -453,7 +454,8 @@ def table(ax,
cellLoc='right', colWidths=None,
rowLabels=None, rowColours=None, rowLoc='left',
colLabels=None, colColours=None, colLoc='center',
loc='bottom', bbox=None):
loc='bottom', bbox=None,
**kwargs):
"""
TABLE(cellText=None, cellColours=None,
cellLoc='right', colWidths=None,
Expand Down Expand Up @@ -517,7 +519,7 @@ def table(ax,
cellColours = ['w' * cols] * rows

# Now create the table
table = Table(ax, loc, bbox)
table = Table(ax, loc, bbox, **kwargs)
height = table._approx_text_height()

# Add the cells
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions lib/matplotlib/tests/test_table.py