diff --git a/pages/1-samples_selection.py b/pages/1-samples_selection.py
index 1d77f7b15440bdc866ce34ec1f86e9d4105f7bab..28795235affa1f3c7159c9617c492291abb96b27 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