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

Function test_date_axvspan

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

Source from the content-addressed store, hash-verified

154
155@image_comparison(['date_axvspan.png'], style='mpl20')
156def test_date_axvspan():
157 # test axvspan with date inputs
158 t0 = datetime.datetime(2000, 1, 20)
159 tf = datetime.datetime(2010, 1, 21)
160 fig, ax = plt.subplots()
161 ax.axvspan(t0, tf, facecolor="blue", alpha=0.25)
162 ax.set_xlim(t0 - datetime.timedelta(days=720),
163 tf + datetime.timedelta(days=720))
164 fig.autofmt_xdate()
165
166
167@image_comparison(['date_axhline.png'], style='mpl20')

Callers

nothing calls this directly

Calls 4

axvspanMethod · 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…