From 2cd91859e5b562534f6231b43cb293795ce60334 Mon Sep 17 00:00:00 2001 From: Max Nuding Date: Sun, 9 Jan 2022 08:16:16 +0100 Subject: [PATCH] Made filtering deploxments optional --- graph.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/graph.py b/graph.py index 1792a41..76fefa3 100755 --- a/graph.py +++ b/graph.py @@ -7,6 +7,7 @@ from matplotlib import pyplot as plt import matplotlib.dates as md SHOW_DEPLOYMENTS = True +FILTER_DEPLOYMENTS = True plt.rcParams["figure.autolayout"] = True @@ -85,9 +86,10 @@ latest_available_temp_date = max(datenums) earliest_available_temp_date = min(datenums) deployments_data = zip(deployment_names, deployment_dates) -filtered_deployments_data = filter(lambda tup: - tup[1] >= earliest_available_temp_date and - tup[1] <= latest_available_temp_date, deployments_data) +filtered_deployments_data = (filter(lambda tup: + tup[1] >= earliest_available_temp_date and + tup[1] <= latest_available_temp_date, deployments_data) + if FILTER_DEPLOYMENTS else deployments_data) max_temp = max(max(data_frame.tempWarmSide1C), max(data_frame.tempWarmSide2C))