Skip to content

Commit

Permalink
axvspan is much nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
jzuhone committed Aug 3, 2024
1 parent c2c19e2 commit 662b354
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions acispy/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,13 +392,8 @@ def fill_between(self, datestart, datestop, color, alpha=1.0):
The transparency of the shaded region. Default is 1.0,
which is opaque.
"""
tmin, tmax = self.ax.get_xlim()
ybot, ytop = self.ax.get_ylim()
t = np.linspace(tmin, tmax, 1000)
tbegin, tend = cxctime2plotdate(CxoTime([datestart, datestop]).secs)
where = (t >= tbegin) & (t <= tend)
self.ax.fill_between(t, ybot, ytop, where=where,
color=color, alpha=alpha)
self.ax.axvspan(tbegin, tend, color=color, alpha=alpha)

def annotate_obsids(self, ypos, ds=None, show_manuvrs=False, ywidth=2.0,
txtheight=1.0, lw=2.0, fontsize=16, datestart=None,
Expand Down

0 comments on commit 662b354

Please sign in to comment.