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

Function test_date_axvline

lib/matplotlib/tests/test_dates.py:180–188  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

178
179@image_comparison(['date_axvline.png'], style='mpl20')
180def test_date_axvline():
181 # test axvline with date inputs
182 t0 = datetime.datetime(2000, 1, 20)
183 tf = datetime.datetime(2000, 1, 21)
184 fig, ax = plt.subplots()
185 ax.axvline(t0, color="red", lw=3)
186 ax.set_xlim(t0 - datetime.timedelta(days=5),
187 tf + datetime.timedelta(days=5))
188 fig.autofmt_xdate()
189
190
191def test_too_many_date_ticks(caplog):

Callers

nothing calls this directly

Calls 4

axvlineMethod · 0.80
autofmt_xdateMethod · 0.80
subplotsMethod · 0.45
set_xlimMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…