Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 631b4dc

Browse files
committed
BUG : added failing test for passing dates to stem
1 parent 9564d80 commit 631b4dc

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1636,6 +1636,19 @@ def test_stem_args():
16361636
ax.stem(x, y, 'r--', basefmt='b--')
16371637

16381638

1639+
@cleanup
1640+
def test_stem_dates():
1641+
fig, ax = plt.subplots(1, 1)
1642+
from dateutil import parser
1643+
x = parser.parse("2013-9-28 11:00:00")
1644+
y = 100
1645+
1646+
x1 = parser.parse("2013-9-28 12:00:00")
1647+
y1 = 200
1648+
1649+
ax.stem([x, x1], [y, y1], "*-")
1650+
1651+
16391652
@image_comparison(baseline_images=['hist_stacked_stepfilled_alpha'])
16401653
def test_hist_stacked_stepfilled_alpha():
16411654
# make some data

0 commit comments

Comments
 (0)