| 130 | @image_comparison(['jpl_bar_units.png'], |
| 131 | savefig_kwarg={'dpi': 120}, style='mpl20') |
| 132 | def 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'], |