Skip to content

Commit 3f2ece5

Browse files
committed
replace cbook with _api
1 parent 2d4a2e8 commit 3f2ece5

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2552,7 +2552,7 @@ def bar_label(self, container, labels=None, *, fmt="%g", label_type="edge",
25522552
def sign(x):
25532553
return 1 if x >= 0 else -1
25542554

2555-
cbook._check_in_list(['edge', 'center'], label_type=label_type)
2555+
_api.check_in_list(['edge', 'center'], label_type=label_type)
25562556

25572557
bars = container.patches
25582558
errorbar = container.errorbar

lib/matplotlib/tests/test_axes.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6850,12 +6850,3 @@ def test_bar_label_labels():
68506850
labels = ax.bar_label(rects, labels=['A', 'B'])
68516851
assert labels[0].get_text() == 'A'
68526852
assert labels[1].get_text() == 'B'
6853-
6854-
6855-
def test_multiplot_autoscale():
6856-
fig = plt.figure()
6857-
ax1, ax2 = fig.subplots(2, 1, sharex='all')
6858-
ax1.scatter([1, 2, 3, 4], [2, 3, 2, 3])
6859-
ax2.axhspan(-5, 5)
6860-
xlim = ax1.get_xlim()
6861-
assert np.allclose(xlim, [0.5, 4.5])

0 commit comments

Comments
 (0)