Skip to content

Commit

Permalink
ENH: Bug fix for set_xrng (#803)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamTheisen authored Feb 27, 2024
1 parent 90fc449 commit 8594886
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion act/plotting/timeseriesdisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def day_night_background(self, dsname=None, subplot_index=(0,)):
for ii in noon:
ax.axvline(x=ii, linestyle='--', color='y', zorder=1)

def set_xrng(self, xrng, subplot_index=(0, 0)):
def set_xrng(self, xrng, subplot_index=(0,)):
"""
Sets the x range of the plot.
Expand Down Expand Up @@ -230,6 +230,7 @@ def set_xrng(self, xrng, subplot_index=(0, 0)):
)
xrng[0] -= dt.timedelta(seconds=1)
xrng[1] += dt.timedelta(seconds=1)

self.axes[subplot_index].set_xlim(xrng)

# Make sure that the xrng value is a numpy array not pandas
Expand Down

0 comments on commit 8594886

Please sign in to comment.