@@ -1046,7 +1046,7 @@ def add_collection(self, collection, autolim=False):
10461046 self ._set_artist_props (collection )
10471047 collection .set_clip_path (self .axesPatch )
10481048 if autolim :
1049- self .update_datalim (collection .get_verts (self .transData ))
1049+ self .update_datalim (collection .get_datalim (self .transData ))
10501050 collection ._remove_method = lambda h : self .collections .remove (h )
10511051
10521052 def add_line (self , line ):
@@ -1105,6 +1105,9 @@ def update_datalim(self, xys):
11051105 # limits and set the bound to be the bounds of the xydata.
11061106 # Otherwise, it will compute the bounds of it's current data
11071107 # and the data in xydata
1108+ # MGDTODO: This isn't always the most efficient way to do this... in
1109+ # some cases things should use update_datalim_bounds
1110+
11081111 if not ma .isMaskedArray (xys ):
11091112 xys = npy .asarray (xys )
11101113 self .update_datalim_numerix (xys [:, 0 ], xys [:, 1 ])
@@ -1119,6 +1122,10 @@ def update_datalim_numerix(self, x, y):
11191122 self .dataLim .update_from_data (x , y , self .ignore_existing_data_limits )
11201123 self .ignore_existing_data_limits = False
11211124
1125+ def update_datalim_bounds (self , bounds ):
1126+ # MGDTODO: Document me
1127+ self .dataLim .bounds = Bbox .union ([self .dataLim , bounds ]).bounds
1128+
11221129 def _get_verts_in_data_coords (self , trans , xys ):
11231130 if trans == self .transData :
11241131 return xys
@@ -4006,8 +4013,8 @@ def scatter(self, x, y, s=20, c='b', marker='o', cmap=None, norm=None,
40064013 shading='faceted --> edgecolors=None
40074014 edgecolors also can be any mpl color or sequence of colors.
40084015
4009- Optional kwargs control the PatchCollection properties:
4010- %(PatchCollection )s
4016+ Optional kwargs control the Collection properties:
4017+ %(Collection )s
40114018 """
40124019
40134020 if not self ._hold : self .cla ()
@@ -4439,7 +4446,7 @@ def pcolor(self, *args, **kwargs):
44394446
44404447 * alpha=1.0 : the alpha blending value
44414448
4442- Return value is a mcoll.PatchCollection
4449+ Return value is a mcoll.Collection
44434450 object
44444451
44454452 Grid Orientation
@@ -4627,7 +4634,7 @@ def pcolormesh(self, *args, **kwargs):
46274634
46284635 * alpha=1.0 : the alpha blending value
46294636
4630- Return value is a collections.PatchCollection
4637+ Return value is a collections.Collection
46314638 object
46324639
46334640 See pcolor for an explantion of the grid orientation and the
0 commit comments