diff --git a/examples/streamlit/component/plotter.py b/examples/streamlit/component/plotter.py index 5e9ae395d4fe8e4d4d303c39aa836f745efa10f3..0c8e3a67f0f0f9aa2fa73341a63e1b677e22e34b 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!")