23
23
import matplotlib .axis as maxis
24
24
import matplotlib .spines as mspines
25
25
import matplotlib .font_manager as font_manager
26
+ import matplotlib .table as mtable
26
27
import matplotlib .text as mtext
27
28
import matplotlib .image as mimage
28
29
from matplotlib .rcsetup import cycler , validate_axisbelow
@@ -1103,7 +1104,6 @@ def cla(self):
1103
1104
1104
1105
self ._gridOn = mpl .rcParams ['axes.grid' ]
1105
1106
self ._children = []
1106
- self .tables = []
1107
1107
self .artists = []
1108
1108
self .images = []
1109
1109
self ._mouseover_set = _OrderedSet ()
@@ -1187,6 +1187,10 @@ def patches(self):
1187
1187
return tuple (a for a in self ._children
1188
1188
if isinstance (a , mpatches .Patch ))
1189
1189
1190
+ @property
1191
+ def tables (self ):
1192
+ return tuple (a for a in self ._children if isinstance (a , mtable .Table ))
1193
+
1190
1194
@property
1191
1195
def texts (self ):
1192
1196
return tuple (a for a in self ._children if isinstance (a , mtext .Text ))
@@ -2086,12 +2090,12 @@ def _update_patch_limits(self, patch):
2086
2090
2087
2091
def add_table (self , tab ):
2088
2092
"""
2089
- Add a `~.Table` to the axes' tables ; return the table.
2093
+ Add a `~.Table` to the Axes ; return the table.
2090
2094
"""
2091
2095
self ._set_artist_props (tab )
2092
- self .tables .append (tab )
2096
+ self ._children .append (tab )
2093
2097
tab .set_clip_path (self .patch )
2094
- tab ._remove_method = self .tables .remove
2098
+ tab ._remove_method = self ._children .remove
2095
2099
return tab
2096
2100
2097
2101
def add_container (self , container ):
@@ -4071,7 +4075,6 @@ def get_children(self):
4071
4075
* self .spines .values (),
4072
4076
* self ._get_axis_list (),
4073
4077
self .title , self ._left_title , self ._right_title ,
4074
- * self .tables ,
4075
4078
* self .images ,
4076
4079
* self .child_axes ,
4077
4080
* ([self .legend_ ] if self .legend_ is not None else []),
0 commit comments