Skip to content
Snippets Groups Projects
Commit 745fd20b authored by UMEC Mathieu's avatar UMEC Mathieu
Browse files

fix legend bug

parent 29dc86b3
No related branches found
No related tags found
No related merge requests found
......@@ -99,7 +99,7 @@ def visualisation_recouvrement (File, titre_du_graphique="Recouvrement moyen des
p1 = sns.barplot(x=colnames[num_colonne_label], y=colnames[numero_de_la_colonne_a_grapher], data=dataframe, palette='Spectral', ax=ax1)
p1.set(title=titre_du_graphique)
# p1.bar_label(p1.containers[0], fontsize=4) # add annotation
p1.bar_label(p1.containers[0], fontsize=6, fmt='%.1f') # add annotation
p1.tick_params(axis='x', rotation=90, size=0.05,labelsize = 6) #rotation des ticklabels
plt.show()
......@@ -129,12 +129,15 @@ def visualisation_frequences_metabolites (File, titre_du_graphique="fréquence d
colnames = list(dataframe.columns)
# create figure and axes
p1 = sns.barplot(x=colnames[num_colonne_label], y=colnames[numero_de_la_colonne_a_grapher], data=dataframe, palette='Spectral', ax=ax1)
p1 = sns.barplot(x=colnames[num_colonne_label], y=colnames[numero_de_la_colonne_a_grapher], data=dataframe, palette='Spectral')
p1.set(title=titre_du_graphique)
# p1.bar_label(p1.containers[0], fontsize=4) # add annotation
p1.tick_params(axis='x', rotation=90, size=0.05,labelsize = 6) #rotation des ticklabels
p1.bar_label(p1.containers[0], fontsize=6, fmt='%.f') # add annotation
p1.tick_params(axis='x', rotation=90, size=0.05,labelsize = 5) #rotation des ticklabels
plt.show()
#visualisation_frequences_metabolites ("C:\\Users\\mumec\\Desktop\\Mini_codes\\frequence_metabolites__R22_L100.xlsx", titre_du_graphique="fréquence des métabolites d'intérêts du mapping de Recon 2.2",numero_de_la_colonne_a_grapher=1, num_colonne_label=0)
def boite_a_metabolites (File, titre_du_graphique="boîte à moustache",numero_de_la_colonne_a_grapher=1):
dataframe= pd.read_excel(File)
colnames = list(dataframe.columns)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment