Skip to content

Commit b6ca76a

Browse files
Hugues Valoisstangirala
Hugues Valois
authored andcommitted
BUG: strange timeseries plot behavior (pandas-dev#16461)
validation tests, closes pandas-dev#6608.
1 parent 6e89490 commit b6ca76a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

pandas/tests/plotting/test_datetimelike.py

+16
Original file line numberDiff line numberDiff line change
@@ -1349,6 +1349,22 @@ def test_hist(self):
13491349
w2 = np.arange(0, 1, .1)[::-1]
13501350
self.plt.hist([x, x], weights=[w1, w2])
13511351

1352+
@slow
1353+
def test_overlapping_datetime(self):
1354+
# GB 6608
1355+
s1 = Series([1, 2, 3], index=[datetime(1995, 12, 31),
1356+
datetime(2000, 12, 31),
1357+
datetime(2005, 12, 31)])
1358+
s2 = Series([1, 2, 3], index=[datetime(1997, 12, 31),
1359+
datetime(2003, 12, 31),
1360+
datetime(2008, 12, 31)])
1361+
1362+
# plot first series, then add the second series to those axes,
1363+
# then try adding the first series again
1364+
ax = s1.plot()
1365+
s2.plot(ax=ax)
1366+
s1.plot(ax=ax)
1367+
13521368

13531369
def _check_plot_works(f, freq=None, series=None, *args, **kwargs):
13541370
import matplotlib.pyplot as plt

0 commit comments

Comments
 (0)