@@ -8154,11 +8154,11 @@ def test_bar_label_location_vertical():
81548154 rects = ax .bar (xs , heights )
81558155 labels = ax .bar_label (rects )
81568156 assert labels [0 ].xy == (xs [0 ], heights [0 ])
8157- assert labels [0 ].get_ha () == 'center'
8158- assert labels [0 ].get_va () == 'bottom'
8157+ assert labels [0 ].get_horizontalalignment () == 'center'
8158+ assert labels [0 ].get_verticalalignment () == 'bottom'
81598159 assert labels [1 ].xy == (xs [1 ], heights [1 ])
8160- assert labels [1 ].get_ha () == 'center'
8161- assert labels [1 ].get_va () == 'top'
8160+ assert labels [1 ].get_horizontalalignment () == 'center'
8161+ assert labels [1 ].get_verticalalignment () == 'top'
81628162
81638163
81648164def test_bar_label_location_vertical_yinverted ():
@@ -8168,11 +8168,11 @@ def test_bar_label_location_vertical_yinverted():
81688168 rects = ax .bar (xs , heights )
81698169 labels = ax .bar_label (rects )
81708170 assert labels [0 ].xy == (xs [0 ], heights [0 ])
8171- assert labels [0 ].get_ha () == 'center'
8172- assert labels [0 ].get_va () == 'top'
8171+ assert labels [0 ].get_horizontalalignment () == 'center'
8172+ assert labels [0 ].get_verticalalignment () == 'top'
81738173 assert labels [1 ].xy == (xs [1 ], heights [1 ])
8174- assert labels [1 ].get_ha () == 'center'
8175- assert labels [1 ].get_va () == 'bottom'
8174+ assert labels [1 ].get_horizontalalignment () == 'center'
8175+ assert labels [1 ].get_verticalalignment () == 'bottom'
81768176
81778177
81788178def test_bar_label_location_horizontal ():
@@ -8181,11 +8181,11 @@ def test_bar_label_location_horizontal():
81818181 rects = ax .barh (ys , widths )
81828182 labels = ax .bar_label (rects )
81838183 assert labels [0 ].xy == (widths [0 ], ys [0 ])
8184- assert labels [0 ].get_ha () == 'left'
8185- assert labels [0 ].get_va () == 'center'
8184+ assert labels [0 ].get_horizontalalignment () == 'left'
8185+ assert labels [0 ].get_verticalalignment () == 'center'
81868186 assert labels [1 ].xy == (widths [1 ], ys [1 ])
8187- assert labels [1 ].get_ha () == 'right'
8188- assert labels [1 ].get_va () == 'center'
8187+ assert labels [1 ].get_horizontalalignment () == 'right'
8188+ assert labels [1 ].get_verticalalignment () == 'center'
81898189
81908190
81918191def test_bar_label_location_horizontal_yinverted ():
@@ -8195,11 +8195,11 @@ def test_bar_label_location_horizontal_yinverted():
81958195 rects = ax .barh (ys , widths )
81968196 labels = ax .bar_label (rects )
81978197 assert labels [0 ].xy == (widths [0 ], ys [0 ])
8198- assert labels [0 ].get_ha () == 'left'
8199- assert labels [0 ].get_va () == 'center'
8198+ assert labels [0 ].get_horizontalalignment () == 'left'
8199+ assert labels [0 ].get_verticalalignment () == 'center'
82008200 assert labels [1 ].xy == (widths [1 ], ys [1 ])
8201- assert labels [1 ].get_ha () == 'right'
8202- assert labels [1 ].get_va () == 'center'
8201+ assert labels [1 ].get_horizontalalignment () == 'right'
8202+ assert labels [1 ].get_verticalalignment () == 'center'
82038203
82048204
82058205def test_bar_label_location_horizontal_xinverted ():
@@ -8209,11 +8209,11 @@ def test_bar_label_location_horizontal_xinverted():
82098209 rects = ax .barh (ys , widths )
82108210 labels = ax .bar_label (rects )
82118211 assert labels [0 ].xy == (widths [0 ], ys [0 ])
8212- assert labels [0 ].get_ha () == 'right'
8213- assert labels [0 ].get_va () == 'center'
8212+ assert labels [0 ].get_horizontalalignment () == 'right'
8213+ assert labels [0 ].get_verticalalignment () == 'center'
82148214 assert labels [1 ].xy == (widths [1 ], ys [1 ])
8215- assert labels [1 ].get_ha () == 'left'
8216- assert labels [1 ].get_va () == 'center'
8215+ assert labels [1 ].get_horizontalalignment () == 'left'
8216+ assert labels [1 ].get_verticalalignment () == 'center'
82178217
82188218
82198219def test_bar_label_location_horizontal_xyinverted ():
@@ -8224,11 +8224,11 @@ def test_bar_label_location_horizontal_xyinverted():
82248224 rects = ax .barh (ys , widths )
82258225 labels = ax .bar_label (rects )
82268226 assert labels [0 ].xy == (widths [0 ], ys [0 ])
8227- assert labels [0 ].get_ha () == 'right'
8228- assert labels [0 ].get_va () == 'center'
8227+ assert labels [0 ].get_horizontalalignment () == 'right'
8228+ assert labels [0 ].get_verticalalignment () == 'center'
82298229 assert labels [1 ].xy == (widths [1 ], ys [1 ])
8230- assert labels [1 ].get_ha () == 'left'
8231- assert labels [1 ].get_va () == 'center'
8230+ assert labels [1 ].get_horizontalalignment () == 'left'
8231+ assert labels [1 ].get_verticalalignment () == 'center'
82328232
82338233
82348234def test_bar_label_location_center ():
@@ -8237,11 +8237,11 @@ def test_bar_label_location_center():
82378237 rects = ax .barh (ys , widths )
82388238 labels = ax .bar_label (rects , label_type = 'center' )
82398239 assert labels [0 ].xy == (0.5 , 0.5 )
8240- assert labels [0 ].get_ha () == 'center'
8241- assert labels [0 ].get_va () == 'center'
8240+ assert labels [0 ].get_horizontalalignment () == 'center'
8241+ assert labels [0 ].get_verticalalignment () == 'center'
82428242 assert labels [1 ].xy == (0.5 , 0.5 )
8243- assert labels [1 ].get_ha () == 'center'
8244- assert labels [1 ].get_va () == 'center'
8243+ assert labels [1 ].get_horizontalalignment () == 'center'
8244+ assert labels [1 ].get_verticalalignment () == 'center'
82458245
82468246
82478247@image_comparison (['test_centered_bar_label_nonlinear.svg' ])
@@ -8273,11 +8273,11 @@ def test_bar_label_location_errorbars():
82738273 rects = ax .bar (xs , heights , yerr = 1 )
82748274 labels = ax .bar_label (rects )
82758275 assert labels [0 ].xy == (xs [0 ], heights [0 ] + 1 )
8276- assert labels [0 ].get_ha () == 'center'
8277- assert labels [0 ].get_va () == 'bottom'
8276+ assert labels [0 ].get_horizontalalignment () == 'center'
8277+ assert labels [0 ].get_verticalalignment () == 'bottom'
82788278 assert labels [1 ].xy == (xs [1 ], heights [1 ] - 1 )
8279- assert labels [1 ].get_ha () == 'center'
8280- assert labels [1 ].get_va () == 'top'
8279+ assert labels [1 ].get_horizontalalignment () == 'center'
8280+ assert labels [1 ].get_verticalalignment () == 'top'
82818281
82828282
82838283@pytest .mark .parametrize ('fmt' , [
@@ -8312,7 +8312,7 @@ def test_bar_label_nan_ydata():
83128312 labels = ax .bar_label (bars )
83138313 assert [l .get_text () for l in labels ] == ['' , '1' ]
83148314 assert labels [0 ].xy == (2 , 0 )
8315- assert labels [0 ].get_va () == 'bottom'
8315+ assert labels [0 ].get_verticalalignment () == 'bottom'
83168316
83178317
83188318def test_bar_label_nan_ydata_inverted ():
@@ -8322,7 +8322,7 @@ def test_bar_label_nan_ydata_inverted():
83228322 labels = ax .bar_label (bars )
83238323 assert [l .get_text () for l in labels ] == ['' , '1' ]
83248324 assert labels [0 ].xy == (2 , 0 )
8325- assert labels [0 ].get_va () == 'bottom'
8325+ assert labels [0 ].get_verticalalignment () == 'bottom'
83268326
83278327
83288328def test_nan_barlabels ():
0 commit comments