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

Function test_jpl_barh_units

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

Source from the content-addressed store, hash-verified

145@image_comparison(['jpl_barh_units.png'],
146 savefig_kwarg={'dpi': 120}, style='mpl20')
147def test_jpl_barh_units():
148 import matplotlib.testing.jpl_units as units
149 units.register()
150
151 day = units.Duration("ET", 24.0 * 60.0 * 60.0)
152 x = [0 * units.km, 1 * units.km, 2 * units.km]
153 w = [1 * day, 2 * day, 3 * day]
154 b = units.Epoch("ET", dt=datetime(2009, 4, 26))
155
156 fig, ax = plt.subplots()
157 ax.barh(x, w, left=b)
158 ax.set_xlim([b - 1 * day, b + w[-1] + (1.001) * day])
159
160
161def test_jpl_datetime_units_consistent():

Callers

nothing calls this directly

Calls 4

barhMethod · 0.80
registerMethod · 0.45
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…