MCPcopy
hub / github.com/matplotlib/matplotlib / test_datetime_masked

Function test_datetime_masked

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

Source from the content-addressed store, hash-verified

1376
1377
1378def test_datetime_masked():
1379 # make sure that all-masked data falls back to the viewlim
1380 # set in convert.axisinfo....
1381 x = np.array([datetime.datetime(2017, 1, n) for n in range(1, 6)])
1382 y = np.array([1, 2, 3, 4, 5])
1383 m = np.ma.masked_greater(y, 0)
1384
1385 fig, ax = plt.subplots()
1386 ax.plot(x, m)
1387 assert ax.get_xlim() == (0, 1)
1388
1389
1390@pytest.mark.parametrize('val', (-1000000, 10000000))

Callers

nothing calls this directly

Calls 3

subplotsMethod · 0.45
plotMethod · 0.45
get_xlimMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…