8000 Added third test for Axes.eventplot · matplotlib/matplotlib@f55957e · GitHub
[go: up one dir, main page]

Skip to content

Commit f55957e

Browse files
Added third test for Axes.eventplot
1 parent bf39791 commit f55957e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

lib/matplotlib/tests/test_datetime.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def test_errorbar(self):
264264
def test_eventplot(self):
265265
mpl.rcParams["date.converter"] = "concise"
266266

267-
fig, (ax1, ax2) = plt.subplots(2, 1, layout="constrained")
267+
fig, (ax1, ax2, ax3) = plt.subplots(3, 1, layout="constrained")
268268

269269
x_dates1 = np.array([datetime.datetime(2020, 6, 30),
270270
datetime.datetime(2020, 7, 22),
@@ -294,6 +294,17 @@ def test_eventplot(self):
294294
lineoffsets=lineoffsets1,
295295
linelengths=linelengths1)
296296

297+
lineoffsets2 = np.array([
298+
datetime.datetime(2020, 7, 1),
299+
datetime.datetime(2020, 7, 15),
300+
datetime.datetime(2020, 8, 1)
301+
], dtype=np.datetime64)
302+
303+
ax3.eventplot([dates1, dates2, dates3],
304+
colors=colors1,
305+
lineoffsets=lineoffsets2,
306+
linelengths=linelengths1)
307+
297308
@pytest.mark.xfail(reason="Test for fill not written yet")
298309
@mpl.style.context("default")
299310
def test_fill(self):

0 commit comments

Comments
 (0)
0