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

Function test_jpl_bar_units

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

Source from the content-addressed store, hash-verified

130@image_comparison(['jpl_bar_units.png'],
131 savefig_kwarg={'dpi': 120}, style='mpl20')
132def test_jpl_bar_units():
133 import matplotlib.testing.jpl_units as units
134 units.register()
135
136 day = units.Duration("ET", 24.0 * 60.0 * 60.0)
137 x = [0 * units.km, 1 * units.km, 2 * units.km]
138 w = [1 * day, 2 * day, 3 * day]
139 b = units.Epoch("ET", dt=datetime(2009, 4, 26))
140 fig, ax = plt.subplots()
141 ax.bar(x, w, bottom=b)
142 ax.set_ylim([b - 1 * day, b + w[-1] + (1.001) * day])
143
144
145@image_comparison(['jpl_barh_units.png'],

Callers

nothing calls this directly

Calls 4

registerMethod · 0.45
subplotsMethod · 0.45
barMethod · 0.45
set_ylimMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…