@@ -2587,12 +2587,12 @@ def sign(x):
25872587 if err is None :
25882588 endpt = extrema
25892589 elif orientation == "vertical" :
2590- endpt = err [:, 1 ].max () if yc >= 0 else err [:, 1 ].min ()
2590+ endpt = err [:, 1 ].max () if dat >= 0 else err [:, 1 ].min ()
25912591 elif orientation == "horizontal" :
2592- endpt = err [:, 0 ].max () if xc >= 0 else err [:, 0 ].min ()
2592+ endpt = err [:, 0 ].max () if dat >= 0 else err [:, 0 ].min ()
25932593
25942594 if label_type == "center" :
2595- value = sign (extrema ) * length
2595+ value = sign (dat ) * length
25962596 elif label_type == "edge" :
25972597 value = extrema
25982598
@@ -2604,20 +2604,20 @@ def sign(x):
26042604 xy = endpt , yc
26052605
26062606 if orientation == "vertical" :
2607- xytext = 0 , sign (extrema ) * padding
2607+ xytext = 0 , sign (dat ) * padding
26082608 else :
2609- xytext = sign (extrema ) * padding , 0
2609+ xytext = sign (dat ) * padding , 0
26102610
26112611 if label_type == "center" :
26122612 ha , va = "center" , "center"
26132613 elif label_type == "edge" :
2614- if orientation == "vertical" and yc >= 0 :
2614+ if orientation == "vertical" and dat >= 0 :
26152615 ha , va = "center" , "bottom"
2616- elif orientation == "vertical" and yc < 0 :
2616+ elif orientation == "vertical" and dat < 0 :
26172617 ha , va = "center" , "top"
2618- elif orientation == "horizontal" and xc >= 0 :
2618+ elif orientation == "horizontal" and dat >= 0 :
26192619 ha , va = "left" , "center"
2620- elif orientation == "horizontal" and xc < 0 :
2620+ elif orientation == "horizontal" and dat < 0 :
26212621 ha , va = "right" , "center"
26222622
26232623 annotation = self .annotate (fmt % value if lbl is None else lbl ,
0 commit comments