Skip to content

Commit bb7fd69

Browse files
committed
Update center bar label test.
1 parent d18d7d7 commit bb7fd69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7741,10 +7741,10 @@ def test_bar_label_location_center():
77417741
ys, widths = [1, 2], [3, -4]
77427742
rects = ax.barh(ys, widths)
77437743
labels = ax.bar_label(rects, label_type='center')
7744-
assert labels[0].xy == (widths[0] / 2, ys[0])
7744+
assert labels[0].xy == (0.5, 0.5)
77457745
assert labels[0].get_ha() == 'center'
77467746
assert labels[0].get_va() == 'center'
7747-
assert labels[1].xy == (widths[1] / 2, ys[1])
7747+
assert labels[1].xy == (0.5, 0.5)
77487748
assert labels[1].get_ha() == 'center'
77497749
assert labels[1].get_va() == 'center'
77507750

0 commit comments

Comments
 (0)