From 518205cad1a9b1c1c14daf3e1c9f73f70f743b6b Mon Sep 17 00:00:00 2001 From: AdamTheisen Date: Fri, 23 Feb 2024 12:24:40 -0600 Subject: [PATCH] ENH: Bug fix for set_xrng --- act/plotting/timeseriesdisplay.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/act/plotting/timeseriesdisplay.py b/act/plotting/timeseriesdisplay.py index f329d35171..56d7990b28 100644 --- a/act/plotting/timeseriesdisplay.py +++ b/act/plotting/timeseriesdisplay.py @@ -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. @@ -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