From fd69b6b5fd9117baeb2b39fa75c3efa3740e2227 Mon Sep 17 00:00:00 2001 From: Denise sur Lya Date: Thu, 18 Jun 2020 23:52:53 +0200 Subject: =?UTF-8?q?couleurs=20personnalisables,=20affichage=20am=C3=A9lior?= =?UTF-8?q?=C3=A9=20(on=20peut=20masquer=20notamment).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gestionOMS.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'gestionOMS.py') 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 -- cgit v1.2.3