File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5843,10 +5843,10 @@ def table(self, **kwargs):
58435843 colLabels=None, colColours=None, colLoc='center',
58445844 loc='bottom', bbox=None):
58455845
5846- Returns a :class:`matplotlib.table.Table` instance. For finer
5847- grained control over tables, use the
5848- :class:`~matplotlib.table.Table` class and add it to the axes
5849- with :meth:`~matplotlib.axes.Axes.add_table`.
5846+ Returns a :class:`matplotlib.table.Table` instance. Either `cellText`
5847+ or `cellColours` must be provided. For finer grained control over
5848+ tables, use the :class:`~matplotlib.table.Table` class and add it to
5849+ the axes with :meth:`~matplotlib.axes.Axes.add_table`.
58505850
58515851 Thanks to John Gill for providing the class and table.
58525852
Original file line number Diff line number Diff line change @@ -553,6 +553,10 @@ def table(ax,
553553 Thanks to John Gill for providing the class and table.
554554 """
555555
556+ if cellColours is None and cellText is None :
557+ raise ValueError ('At least one argument from "cellColours" or '
558+ '"cellText" must be provided to create a table.' )
559+
556560 # Check we have some cellText
557561 if cellText is None :
558562 # assume just colours are needed
You can’t perform that action at this time.
0 commit comments