@@ -522,7 +522,7 @@ def set_figure(self, fig):
522
522
self .bbox = mtransforms .TransformedBbox (self ._position ,
523
523
fig .transFigure )
524
524
# these will be updated later as data is added
525
- self .dataLim = mtransforms .Bbox .unit ()
525
+ self .dataLim = mtransforms .Bbox .null ()
526
526
self .viewLim = mtransforms .Bbox .unit ()
527
527
self .transScale = mtransforms .TransformWrapper (
528
528
mtransforms .IdentityTransform ())
@@ -1625,13 +1625,16 @@ def relim(self):
1625
1625
# Collections are deliberately not supported (yet); see
1626
1626
# the TODO note in artists.py.
1627
1627
self .dataLim .ignore (True )
1628
+ self .dataLim .set_points (mtransforms .Bbox .null ().get_points ())
1628
1629
self .ignore_existing_data_limits = True
1630
+
1629
1631
for line in self .lines :
1630
1632
self ._update_line_limits (line )
1631
1633
1632
1634
for p in self .patches :
1633
1635
self ._update_patch_limits (p )
1634
1636
1637
+
1635
1638
def update_datalim (self , xys , updatex = True , updatey = True ):
1636
1639
"""
1637
1640
Update the data lim bbox with seq of xy tups or equiv. 2-D array
@@ -8467,11 +8470,11 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
8467
8470
for x , y , c in reversed (zip (xvals , yvals , color )):
8468
8471
if fill :
8469
8472
patches .append (self .fill (x , y ,
8470
- closed = False ,
8473
+ closed = True ,
8471
8474
facecolor = c ))
8472
8475
else :
8473
8476
patches .append (self .fill (x , y ,
8474
- closed = False , edgecolor = c ,
8477
+ closed = True , edgecolor = c ,
8475
8478
fill = False ))
8476
8479
8477
8480
# we return patches, so put it back in the expected order
@@ -8531,6 +8534,7 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
8531
8534
8532
8535
self .set_autoscalex_on (_saved_autoscalex )
8533
8536
self .set_autoscaley_on (_saved_autoscaley )
8537
+ self .relim ()
8534
8538
self .autoscale_view ()
8535
8539
8536
8540
if nx == 1 :
0 commit comments