File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5873,10 +5873,10 @@ def table(self, **kwargs):
58735873 colLabels=None, colColours=None, colLoc='center',
58745874 loc='bottom', bbox=None):
58755875
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`.
58805880
58815881 Thanks to John Gill for providing the class and table.
58825882
Original file line number Diff line number Diff line change @@ -581,6 +581,10 @@ def table(ax,
581581 Thanks to John Gill for providing the class and table.
582582 """
583583
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+
584588 # Check we have some cellText
585589 if cellText is None :
586590 # assume just colours are needed
You can’t perform that action at this time.
0 commit comments