From 9656e7f6ad76f8907d9e812ff2055e2ee4c1b1ef Mon Sep 17 00:00:00 2001 From: Dario Barghini Date: Tue, 21 Jan 2025 15:31:18 +0100 Subject: [PATCH] Update pysqm/plot.py. Add option to ignore limits_nsb if null vector --- pysqm/plot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pysqm/plot.py b/pysqm/plot.py index 8f127a2..edd3033 100644 --- a/pysqm/plot.py +++ b/pysqm/plot.py @@ -590,7 +590,7 @@ class Plot(object): self.thegraph_sunalt.set_xlim([\ config.limits_sunalt[0]*np.pi/180.,\ config.limits_sunalt[1]*np.pi/180.]) - self.thegraph_sunalt.set_ylim(config.limits_nsb) + if np.size(config.limits_nsb) == 2: self.thegraph_sunalt.set_ylim(config.limits_nsb) premidnight_label = str(Data.premidnight.label_dates).replace('[','').replace(']','') aftermidnight_label = str(Data.aftermidnight.label_dates).replace('[','').replace(']','') @@ -671,7 +671,7 @@ class Plot(object): return(None) self.thegraph_time.set_xlim(begin_plot_dt,end_plot_dt) - self.thegraph_time.set_ylim(config.limits_nsb) + if np.size(config.limits_nsb) == 2: self.thegraph_time.set_ylim(config.limits_nsb) premidnight_label = str(Data.premidnight.label_dates).replace('[','').replace(']','') aftermidnight_label = str(Data.aftermidnight.label_dates).replace('[','').replace(']','') -- GitLab