From d25017b3dfb5e2b30d6fa0adaff0781dceaf5ec3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Oriol=20Tint=C3=B3?= <oriol.tinto@lmu.de>
Date: Thu, 22 Jun 2023 15:43:44 +0200
Subject: [PATCH] Minor update in streamlit example.

---
 examples/streamlit/component/plotter.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/examples/streamlit/component/plotter.py b/examples/streamlit/component/plotter.py
index 5e9ae39..0c8e3a6 100644
--- a/examples/streamlit/component/plotter.py
+++ b/examples/streamlit/component/plotter.py
@@ -1,6 +1,7 @@
 import streamlit as st
 import matplotlib.pyplot as plt
 
+
 def plot_comparison(data, slice_selection):
     col1, col2, col3, *others = st.columns(3)
 
@@ -19,7 +20,6 @@ def plot_comparison(data, slice_selection):
     slice_selection = new_slice
 
     if data.reference_da is not None:
-        print(f"{slice_selection=}")
         slice_selection = {key: (value if key != "lat" else slice(value.stop, value.start)) for key, value in
                            slice_selection.items()}
 
@@ -33,8 +33,8 @@ def plot_comparison(data, slice_selection):
 
         if non_slices:
             reference_slice = reference_slice.sel(**non_slices, method="nearest")
-        print(reference_slice)
         try:
+            plt.figure()
             reference_slice.plot()
             fig1 = plt.gcf()
             with col1:
@@ -76,8 +76,5 @@ def plot_comparison(data, slice_selection):
         except TypeError:
             pass
 
-
-
-
     else:
         st.text("Compress the data to show the plot!")
-- 
GitLab