| 145 | @image_comparison(['jpl_barh_units.png'], |
| 146 | savefig_kwarg={'dpi': 120}, style='mpl20') |
| 147 | def 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 | |
| 161 | def test_jpl_datetime_units_consistent(): |