From c4455745cb770e1a4c822379c053259d9f59ee1a Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Mon, 25 Sep 2023 11:05:37 -0500
Subject: [PATCH] snapshot...

---
 modules/util/plot.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/util/plot.py b/modules/util/plot.py
index 4d884709..2f0bab9b 100644
--- a/modules/util/plot.py
+++ b/modules/util/plot.py
@@ -292,7 +292,7 @@ def make_time_domain_hist(values, edges):
     plt.show()
 
 
-def scatter_density(x, y, color=None, fname=None, fig=None):
+def scatter_density(x, y, color=None, fname=None, fig=None, x_rng=None, y_rng=None):
     if fig is None:
         fig = plt.figure()
     ax = fig.add_subplot(1, 1, 1, projection='scatter_density')
@@ -300,6 +300,9 @@ def scatter_density(x, y, color=None, fname=None, fig=None):
         ax.scatter_density(x, y, color=color)
     else:
         ax.scatter_density(x, y)
+    if x_rng is not None and y_rng is not None:
+        ax.set_xlim(x_rng[0], x_rng[1])
+        ax.set_ylim(y_rng[0], y_rng[1])
 
     if fname is not None:
         fig.savefig(fname)
-- 
GitLab