Skip to content
Snippets Groups Projects
Commit a547425d authored by DIANE's avatar DIANE
Browse files
parents 810b5310 12345cf7
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@ from scipy.sparse.csgraph import minimum_spanning_tree
from scipy.sparse import csgraph
# Modelling
from juliacall import Main as jl
#from juliacall import Main as jl
from pinard import utils
from pinard import preprocessing as pp
......
......@@ -241,9 +241,35 @@ if not t.empty:
plt.savefig("./Report/Figures/test.png")
st.plotly_chart(fig, use_container_width=True)
import plotly.express as px
if labels:
num_clusters = len(np.unique(labels))
custom_color_palette = px.colors.qualitative.Plotly[:num_clusters]
color_discrete_sequence=custom_color_palette
# Créer et exporter le graphique Axe1-Axe2 en PNG
fig_axe1_axe2 = px.scatter(tcr, x=axis1, y=axis2, color=labels if list(labels) else None, color_discrete_sequence=custom_color_palette)
fig_axe1_axe2.update_layout(title='Axe1-Axe2')
fig_axe1_axe2.update_traces(marker=dict(size=4))
fig_axe1_axe2.write_image("./Report/Figures/plot_axe1_axe2.png")
# Créer et exporter le graphique Axe1-Axe3 en PNG
fig_axe1_axe3 = px.scatter(tcr, x=axis1, y=axis3, color=labels if list(labels) else None, color_discrete_sequence=custom_color_palette)
fig_axe1_axe3.update_layout(title='Axe1-Axe3')
fig_axe1_axe3.update_traces(marker=dict(size=4))
fig_axe1_axe3.write_image("./Report/Figures/plot_axe1_axe3.png")
# Créer et exporter le graphique Axe2-Axe3 en PNG
fig_axe2_axe3 = px.scatter(tcr, x=axis2, y=axis3, color=labels if list(labels) else None, color_discrete_sequence=custom_color_palette)
fig_axe2_axe3.update_layout(title='Axe2-Axe3')
fig_axe2_axe3.update_traces(marker=dict(size=4))
fig_axe2_axe3.write_image("./Report/Figures/plot_axe2_axe3.png")
#################################################################
if not spectra.empty:
if dim_red_method == dim_red_methods[1]:
......
import streamlit as st
from Packages import *
st.set_page_config(page_title="NIRS Utils", page_icon=":goat:", layout="wide",)
if 'interface' not in st.session_state:
st.session_state['interface'] = 'simple'
from Modules import *
from Class_Mod.DATA_HANDLING import *
# HTML for the banner "CEFE - CNRS"
# bandeau_html = """
# <div style="width: 100%; background-color: #4682B4; padding: 10px; margin-bottom: 10px;">
......@@ -28,7 +33,7 @@ with st.container():
.stButton>button {
display: block;
margin: 0 auto;
width: 200px;
width: 200px;
height: 50px;
font-size: 16px;
}
......
src/plot_axe1_axe2.png

15.6 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment