From 7f809eaa5699889eab3b4217fc6fda9bd580fe06 Mon Sep 17 00:00:00 2001
From: Mouhcine <mouhcine.maimouni@cefe.cnrs.fr>
Date: Wed, 17 Apr 2024 14:14:12 +0200
Subject: [PATCH] Export des graphes vers report

---
 pages/1-samples_selection.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pages/1-samples_selection.py b/pages/1-samples_selection.py
index 1d77f7b..2879523 100644
--- a/pages/1-samples_selection.py
+++ b/pages/1-samples_selection.py
@@ -236,10 +236,10 @@ if not spectra.empty:
             hotelling = dr_model.hotelling_
             ax2 = st.selectbox("Component", options=dr_model.scores_.columns, index=4)
 
-                hotelling = dr_model.hotelling_
-                fig = px.scatter(t, x=hotelling[ax2], y=residuals[ax2]).update_layout(xaxis_title="T²",yaxis_title="Residuals")
-                st.plotly_chart(fig, use_container_width=True)
-                fig.write_image("./Report/figures/graphe_hotelling.png", format="png")
+            hotelling = dr_model.hotelling_
+            fig = px.scatter(t, x=hotelling[ax2], y=residuals[ax2]).update_layout(xaxis_title="T²",yaxis_title="Residuals")
+            st.plotly_chart(fig, use_container_width=True)
+            fig.write_image("./Report/figures/graphe_hotelling.png", format="png")
             
     if dim_red_method == dim_red_methods[2] and clus_method == cluster_methods[2]: # UMAP clustered by HDBSCAN
         with loadings: # Display some clustering metrics
-- 
GitLab