diff --git a/latools/helpers/plot.py b/latools/helpers/plot.py
index <HASH>..<HASH> 100644
--- a/latools/helpers/plot.py
+++ b/latools/helpers/plot.py
@@ -509,16 +509,15 @@ def autorange_plot(t, sig, gwin=7, swin=None, win=30,
     -------
     fig, axes
     """
-    if swin is None:
-        swin = gwin // 2
-
-    sigs = fastsmooth(sig, swin)
+    if swin is not None:
+        sigs = fastsmooth(sig, swin)
+    else:
+        sigs = sig
 
     # perform autorange calculations
     
     # bins = 50
-    bins = sig.size // nbin
-    kde_x = np.linspace(sig.min(), sig.max(), bins)
+    kde_x = np.linspace(sig.min(), sig.max(), nbin)
 
     kde = gaussian_kde(sigs)
     yd = kde.pdf(kde_x)
bring autorange_plot in line with autorange