Skip to content

Commit 7bc452d

Browse files
tacaswellmdboom
authored andcommitted
TST : add test for log transform with zero
example from PR matplotlib#3998
1 parent 44230b5 commit 7bc452d

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

28.2 KB
Loading

lib/matplotlib/tests/test_path.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,17 @@ def test_point_in_path_nan():
7272
assert not contains[0]
7373

7474

75+
@image_comparison(baseline_images=['semi_log_with_zero'], extensions=['png'])
76+
def test_log_transform_with_zero():
77+
x = np.arange(-10, 10)
78+
y = (1.0 - 1.0/(x**2+1))**20
79+
80+
fig, ax = plt.subplots()
81+
ax.semilogy(x, y, "-o", lw=15)
82+
ax.grid(True)
83+
plt.show()
84+
85+
7586
if __name__ == '__main__':
7687
import nose
7788
nose.runmodule(argv=['-s', '--with-doctest'], exit=False)

0 commit comments

Comments
 (0)