Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5ffb34e

Browse filesBrowse files
committed
Add image comparison test.
1 parent bb7fd69 commit 5ffb34e
Copy full SHA for 5ffb34e

File tree

Expand file treeCollapse file tree

2 files changed

+176
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+176
-0
lines changed
+166Lines changed: 166 additions & 0 deletions
Loading

‎lib/matplotlib/tests/test_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_axes.py
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7749,6 +7749,16 @@ def test_bar_label_location_center():
77497749
assert labels[1].get_va() == 'center'
77507750

77517751

7752+
@image_comparison(['test_centered_bar_label_nonlinear.svg'])
7753+
def test_centered_bar_label_nonlinear():
7754+
_, ax = plt.subplots()
7755+
bar_container = ax.barh(['c', 'b', 'a'], [1_000, 5_000, 7_000])
7756+
ax.set_xscale('log')
7757+
ax.set_xlim(1, None)
7758+
ax.bar_label(bar_container, label_type='center')
7759+
ax.set_axis_off()
7760+
7761+
77527762
def test_bar_label_location_errorbars():
77537763
ax = plt.gca()
77547764
xs, heights = [1, 2], [3, -4]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.