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

Skip to content

Commit f959cbe

Browse files
committed
TST: test hist with no 0 index pd.Series
1 parent 9c37e3f commit f959cbe

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
@@ -4201,6 +4201,19 @@ def test_pandas_indexing_dates():
42014201
ax.plot('dates', 'values', data=without_zero_index)
42024202

42034203

4204+
@cleanup
4205+
def test_pandas_indexing_hist():
4206+
try:
4207+
import pandas as pd
4208+
except ImportError:
4209+
raise SkipTest("Pandas not installed")
4210+
4211+
ser_1 = pd.Series(data=[1, 2, 2, 3, 3, 4, 4, 4, 4, 5])
4212+
ser_2 = ser_1.iloc[1:]
4213+
fig, axes = plt.subplots()
4214+
axes.hist(ser_2)
4215+
4216+
42044217
if __name__ == '__main__':
42054218
import nose
42064219
import sys

0 commit comments

Comments
 (0)