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
@@ -1146,7 +1147,6 @@ def cla(self):
1146
1147
1147
1148
self ._gridOn = mpl .rcParams ['axes.grid' ]
1148
1149
self ._children = []
1149
- self .tables = []
1150
1150
self .artists = []
1151
1151
self .images = []
1152
1152
self ._mouseover_set = _OrderedSet ()
@@ -1230,6 +1230,10 @@ def patches(self):
1230
1230
return tuple (a for a in self ._children
1231
1231
if isinstance (a , mpatches .Patch ))
1232
1232
1233
+ @property
1234
+ def tables (self ):
1235
+ return tuple (a for a in self ._children if isinstance (a , mtable .Table ))
1236
+
1233
1237
@property
1234
1238
def texts (self ):
1235
1239
return tuple (a for a in self ._children if isinstance (a , mtext .Text ))
@@ -2122,12 +2126,12 @@ def _update_patch_limits(self, patch):
2122
2126
2123
2127
def add_table (self , tab ):
2124
2128
"""
2125
- Add a `~.Table` to the axes' tables ; return the table.
2129
+ Add a `~.Table` to the Axes ; return the table.
2126
2130
"""
2127
2131
self ._set_artist_props (tab )
2128
- self .tables .append (tab )
2132
+ self ._children .append (tab )
2129
2133
tab .set_clip_path (self .patch )
2130
- tab ._remove_method = self .tables .remove
2134
+ tab ._remove_method = self ._children .remove
2131
2135
return tab
2132
2136
2133
2137
def add_container (self , container ):
@@ -4246,7 +4250,6 @@ def get_children(self):
4246
4250
* self .spines .values (),
4247
4251
* self ._get_axis_list (),
4248
4252
self .title , self ._left_title , self ._right_title ,
4249
- * self .tables ,
4250
4253
* self .images ,
4251
4254
* self .child_axes ,
4252
4255
* ([self .legend_ ] if self .legend_ is not None else []),
0 commit comments