MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_broken_barh_timedelta

Function test_broken_barh_timedelta

lib/matplotlib/tests/test_axes.py:7682–7688  ·  view source on GitHub ↗

Check that timedelta works as x, dx pair for this method.

()

Source from the content-addressed store, hash-verified

7680
7681
7682def test_broken_barh_timedelta():
7683 """Check that timedelta works as x, dx pair for this method."""
7684 fig, ax = plt.subplots()
7685 d0 = datetime.datetime(2018, 11, 9, 0, 0, 0)
7686 pp = ax.broken_barh([(d0, datetime.timedelta(hours=1))], [1, 2])
7687 assert pp.get_paths()[0].vertices[0, 0] == mdates.date2num(d0)
7688 assert pp.get_paths()[0].vertices[2, 0] == mdates.date2num(d0) + 1 / 24
7689
7690
7691def test_broken_barh_align():

Callers

nothing calls this directly

Calls 3

broken_barhMethod · 0.80
subplotsMethod · 0.45
get_pathsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…