Skip to content
Prev Previous commit
Next Next commit
TST: test hist with no 0 index pd.Series
  • Loading branch information
tacaswell committed Dec 29, 2015
commit f959cbee82489a51a6c65afefd9e325b5e5591c4
13 changes: 13 additions & 0 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4201,6 +4201,19 @@ def test_pandas_indexing_dates():
ax.plot('dates', 'values', data=without_zero_index)


@cleanup
def test_pandas_indexing_hist():
try:
import pandas as pd
except ImportError:
raise SkipTest("Pandas not installed")

ser_1 = pd.Series(data=[1, 2, 2, 3, 3, 4, 4, 4, 4, 5])
ser_2 = ser_1.iloc[1:]
fig, axes = plt.subplots()
axes.hist(ser_2)


if __name__ == '__main__':
import nose
import sys
Expand Down