| 972 | |
| 973 | @image_comparison(['axvspan_epoch.png'], style='mpl20') |
| 974 | def test_axvspan_epoch(): |
| 975 | import matplotlib.testing.jpl_units as units |
| 976 | units.register() |
| 977 | |
| 978 | # generate some data |
| 979 | t0 = units.Epoch("ET", dt=datetime.datetime(2009, 1, 21)) |
| 980 | tf = units.Epoch("ET", dt=datetime.datetime(2009, 1, 22)) |
| 981 | dt = units.Duration("ET", units.day.convert("sec")) |
| 982 | |
| 983 | ax = plt.gca() |
| 984 | ax.axvspan(t0, tf, facecolor="blue", alpha=0.25) |
| 985 | ax.set_xlim(t0 - 5.0*dt, tf + 5.0*dt) |
| 986 | |
| 987 | |
| 988 | @image_comparison(['axhspan_epoch.png'], style='mpl20') |