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

Function test_DateFormatter

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

Source from the content-addressed store, hash-verified

272
273@image_comparison(['DateFormatter_fractionalSeconds.png'], style='mpl20')
274def test_DateFormatter():
275 import matplotlib.testing.jpl_units as units
276 units.register()
277
278 # Let's make sure that DateFormatter will allow us to have tick marks
279 # at intervals of fractional seconds.
280
281 t0 = datetime.datetime(2001, 1, 1, 0, 0, 0)
282 tf = datetime.datetime(2001, 1, 1, 0, 0, 1)
283
284 fig = plt.figure()
285 ax = plt.subplot()
286 ax.set_autoscale_on(True)
287 ax.plot([t0, tf], [0.0, 1.0], marker='o')
288
289 # rrule = mpldates.rrulewrapper( dateutil.rrule.YEARLY, interval=500 )
290 # locator = mpldates.RRuleLocator( rrule )
291 # ax.xaxis.set_major_locator( locator )
292 # ax.xaxis.set_major_formatter( mpldates.AutoDateFormatter(locator) )
293
294 ax.autoscale_view()
295 fig.autofmt_xdate()
296
297
298def test_locator_set_formatter():

Callers

nothing calls this directly

Calls 6

figureMethod · 0.80
set_autoscale_onMethod · 0.80
autofmt_xdateMethod · 0.80
registerMethod · 0.45
plotMethod · 0.45
autoscale_viewMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…