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

Function test_shared_axis_datetime

lib/matplotlib/tests/test_units.py:219–227  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

217
218
219def test_shared_axis_datetime():
220 # datetime uses dates.DateConverter
221 y1 = [datetime(2020, i, 1, tzinfo=timezone.utc) for i in range(1, 13)]
222 y2 = [datetime(2021, i, 1, tzinfo=timezone.utc) for i in range(1, 13)]
223 fig, (ax1, ax2) = plt.subplots(1, 2, sharey=True)
224 ax1.plot(y1)
225 ax2.plot(y2)
226 ax1.yaxis.set_units(timezone(timedelta(hours=5)))
227 assert ax2.yaxis.units == timezone(timedelta(hours=5))
228
229
230def test_shared_axis_categorical():

Callers

nothing calls this directly

Calls 3

set_unitsMethod · 0.80
subplotsMethod · 0.45
plotMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…