diff options
author | Denise sur Lya <sekhmet@lya> | 2020-06-19 17:05:32 +0200 |
---|---|---|
committer | Denise sur Lya <sekhmet@lya> | 2020-06-19 17:05:32 +0200 |
commit | 61020126080c00be471ea41a0b25109469d8bda1 (patch) | |
tree | 1300bf4730f56a9a3670a9255a2e5ed8ee4c0b4c /trace_courbe.py | |
parent | 93ba28a72f0df1e113ad12736839b8c6e12de7ae (diff) | |
download | oms-61020126080c00be471ea41a0b25109469d8bda1.tar.gz oms-61020126080c00be471ea41a0b25109469d8bda1.tar.zst oms-61020126080c00be471ea41a0b25109469d8bda1.zip |
amélioration du code encore
Diffstat (limited to 'trace_courbe.py')
-rw-r--r-- | trace_courbe.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/trace_courbe.py b/trace_courbe.py index 4ccc6eb..ae48c41 100644 --- a/trace_courbe.py +++ b/trace_courbe.py | |||
@@ -7,27 +7,23 @@ from gestion_unites import * | |||
7 | import matplotlib.pyplot as plt | 7 | import matplotlib.pyplot as plt |
8 | 8 | ||
9 | def cree_figure(conf,l_jours,l_poids,liste_err): | 9 | def cree_figure(conf,l_jours,l_poids,liste_err): |
10 | #warning("debut de cree_figure"+str(conf),liste_err) | ||
11 | try: | 10 | try: |
12 | liste_data_labels_p,liste_data_labels_z = renvoie_liste_labels(conf,liste_data_choisie_p,liste_data_choisie_z,liste_err) | 11 | liste_data_labels_p,liste_data_labels_z = renvoie_liste_labels(conf,liste_data_choisie_p,liste_data_choisie_z,liste_err) |
13 | except: | 12 | except: |
14 | erreur("bug avec liste data labels",liste_err) | 13 | erreur("bug avec liste data labels",liste_err) |
15 | return "" | 14 | return "" |
16 | 15 | ||
17 | #warning("bla",liste_err) | ||
18 | if conf["maxi"] ==0: | 16 | if conf["maxi"] ==0: |
19 | if l_jours != []: | 17 | if l_jours != []: |
20 | jour_maxi = max(l_jours)# pas la peine d'aller très au delà du jour max | 18 | jour_maxi = max(l_jours)# pas la peine d'aller très au delà du jour max |
21 | jour_maxi = int(jour_maxi* 1.1)+3 # on rajoute un peu | 19 | jour_maxi = int(jour_maxi* 1.1)+3 # on rajoute un peu |
22 | else: | 20 | else: |
23 | jour_maxi = int(6*jours_dans_mois) # si pas de données, arbitrairement on met ça | 21 | jour_maxi = CONFIG["jours_defaut_donneesvides"] # si pas de données, arbitrairement on met ça |
24 | else: | 22 | else: |
25 | jour_maxi = conf["maxi"]+1 | 23 | jour_maxi = conf["maxi"]+1 |
26 | 24 | ||
27 | # On s'assure que c'est bien compris dans les bornes | 25 | # On s'assure que c'est bien compris dans les bornes |
28 | #warning("bla"+str(jour_maxi),liste_err) | ||
29 | jour_maxi = max(CONFIG["jours_mini_courbe"],min(jour_maxi,CONFIG["jours_maxi_courbe"])) | 26 | jour_maxi = max(CONFIG["jours_mini_courbe"],min(jour_maxi,CONFIG["jours_maxi_courbe"])) |
30 | #warning("bla"+str(jour_maxi),liste_err) | ||
31 | 27 | ||
32 | if conf["unite"] == "": | 28 | if conf["unite"] == "": |
33 | conf["unite"] = choix_unite(jour_maxi) | 29 | conf["unite"] = choix_unite(jour_maxi) |
@@ -39,9 +35,6 @@ def cree_figure(conf,l_jours,l_poids,liste_err): | |||
39 | 35 | ||
40 | titre = "Courbe de poids OMS" | 36 | titre = "Courbe de poids OMS" |
41 | 37 | ||
42 | #warning("cree_figure : ça va jusque là ",liste_err) | ||
43 | #warning("bli"+str(conf),liste_err) | ||
44 | #warninf("coucou") | ||
45 | 38 | ||
46 | if conf["typecourbe"] == "P": | 39 | if conf["typecourbe"] == "P": |
47 | # percentiles | 40 | # percentiles |