Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit59deaf4

Browse files
committed
TST: Add test of broken_barh
1 parent01f85af commit59deaf4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎lib/matplotlib/tests/test_axes.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5374,6 +5374,15 @@ def test_broken_barh_empty():
53745374
ax.broken_barh([], (.1,.5))
53755375

53765376

5377+
deftest_broken_barh_timedelta():
5378+
""" Check that timedelta works as x, dx pair for this method """
5379+
fig,ax=plt.subplots()
5380+
pp=ax.broken_barh([(datetime.datetime(2018,11,9,0,0,0),
5381+
datetime.timedelta(hours=1))], [1,2])
5382+
assertpp.get_paths()[0].vertices[0,0]==737007.0
5383+
assertpp.get_paths()[0].vertices[2,0]==737007.0+1/24
5384+
5385+
53775386
deftest_pandas_pcolormesh(pd):
53785387
time=pd.date_range('2000-01-01',periods=10)
53795388
depth=np.arange(20)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp