Skip to content

Commit e754807

Browse files
committed
added test case for eventplot default params
1 parent 30eb16a commit e754807

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2187,6 +2187,23 @@ def test_eventplot():
21872187
np.testing.assert_equal(num_collections, num_datasets)
21882188

21892189

2190+
@image_comparison(baseline_images=['test_eventplot_defaults'], extensions=['png'], remove_text=True)
2191+
def test_eventplot_defaults():
2192+
'''
2193+
test that eventplot produces the correct output given the default params
2194+
(see bug #3728)
2195+
'''
2196+
np.random.seed(0)
2197+
2198+
data1 = np.random.random([32, 20]).tolist()
2199+
data2 = np.random.random([6, 20]).tolist()
2200+
data = data1 + data2
2201+
2202+
fig = plt.figure()
2203+
axobj = fig.add_subplot(111)
2204+
colls = axobj.eventplot(data)
2205+
2206+
21902207
@cleanup
21912208
def test_empty_eventplot():
21922209
fig, ax = plt.subplots(1, 1)

0 commit comments

Comments
 (0)