X-Git-Url: https://git.immae.eu/?p=perso%2FDenise%2Foms.git;a=blobdiff_plain;f=gestionOMS.py;h=5b773d97b0510384e3a99c4986f80300642cdbe2;hp=0ff4d5dd672150dac1f0094b06f63a45297926dd;hb=fd69b6b5fd9117baeb2b39fa75c3efa3740e2227;hpb=be2bf5155489b103e616845ffedb1a58c3808c48 diff --git a/gestionOMS.py b/gestionOMS.py index 0ff4d5d..5b773d9 100644 --- a/gestionOMS.py +++ b/gestionOMS.py @@ -7,6 +7,7 @@ Created on Mon May 18 08:59:11 2020 """ from gestion_erreurs import * from configuration import * +from gestion_couleurs import * import csv @@ -35,13 +36,20 @@ def affichepercentile(pc): def afficheecarttype(z): if z==0: return "Moyenne" - elif z<0: - return str(z)+"z" else: - return "+"+str(z)+"z" - -liste_data_labels_p = [(nocol,affichepercentile(pc),degrade(pc)) for (nocol,pc) in liste_data_choisie_p] -liste_data_labels_z = [(nocol,afficheecarttype(z),degrade((z+3)/3*50) ) for (nocol,z) in liste_data_choisie_z] + #return ("z = "+str(z)) + if z>0: + chaine = r"$+"+str(z)+" \sigma$" + else: + chaine = r"$"+str(z)+"\sigma$" + return (chaine) + +def renvoie_liste_labels(conf,liste_data_choisie_p,liste_data_choisie_z,liste_err): + """ fabrique les deux listes de labels OMS""" + #warning(str(liste_data_choisie_p),liste_err) + liste_data_labels_p = [(nocol,affichepercentile(pc),degrade_choix(conf["couleur1"],conf["couleur2"],conf["couleur3"],pc)) for (nocol,pc) in liste_data_choisie_p] + liste_data_labels_z = [(nocol,afficheecarttype(z),degrade_choix(conf["couleur1"],conf["couleur2"],conf["couleur3"],(z+3)/3*50) ) for (nocol,z) in liste_data_choisie_z] + return liste_data_labels_p,liste_data_labels_z #liste_data_labels= liste_data_labels_z