File tree 2 files changed +8
-4
lines changed 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -5873,10 +5873,10 @@ def table(self, **kwargs):
5873
5873
colLabels=None, colColours=None, colLoc='center',
5874
5874
loc='bottom', bbox=None):
5875
5875
5876
- Returns a :class:`matplotlib.table.Table` instance. For finer
5877
- grained control over tables, use the
5878
- :class:`~matplotlib.table.Table` class and add it to the axes
5879
- with :meth:`~matplotlib.axes.Axes.add_table`.
5876
+ Returns a :class:`matplotlib.table.Table` instance. Either `cellText`
5877
+ or `cellColours` must be provided. For finer grained control over
5878
+ tables, use the :class:`~matplotlib.table.Table` class and add it to
5879
+ the axes with :meth:`~matplotlib.axes.Axes.add_table`.
5880
5880
5881
5881
Thanks to John Gill for providing the class and table.
5882
5882
Original file line number Diff line number Diff line change @@ -581,6 +581,10 @@ def table(ax,
581
581
Thanks to John Gill for providing the class and table.
582
582
"""
583
583
584
+ if cellColours is None and cellText is None :
585
+ raise ValueError ('At least one argument from "cellColours" or '
586
+ '"cellText" must be provided to create a table.' )
587
+
584
588
# Check we have some cellText
585
589
if cellText is None :
586
590
# assume just colours are needed
You can’t perform that action at this time.
0 commit comments