From cd692bc79a82db544e6e5673aafc3334172cf12e Mon Sep 17 00:00:00 2001 From: gribse Date: Tue, 11 Feb 2025 00:05:16 +0100 Subject: [PATCH] =?UTF-8?q?modifications=20cosm=C3=A9tiques?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- abaqueCuve.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/abaqueCuve.py b/abaqueCuve.py index ffca264..5afe7e5 100644 --- a/abaqueCuve.py +++ b/abaqueCuve.py @@ -70,13 +70,13 @@ volumes_grad = np.linspace(0, volume_max, nb_grad_fleche) flèche_grad = [find_f(v / longueur_cuve, rayon_cuve) for v in volumes_grad] # Tracer le graphe -plt.rcParams.update({'font.size': 22}) # Taille du texte -fig, ax1 = plt.subplots(figsize=(29.7-1, 21-1)) # Format A4 avec une marge de 1 cm +plt.rcParams.update({'font.size': 30}) # Taille du texte +fig, ax1 = plt.subplots(figsize=(29.7-1, 16.5)) # Format A4 avec une marge de 1 cm # Axe principal : Volume en fonction des mois volumes_L = volumes * 1000 # Conversion en litres -ax1.plot(dates, volumes_L, label="Volume (L)", color='b', linewidth=2) +ax1.plot(dates, volumes_L, label="Volume (L)", color='b', linewidth=2, alpha=0) # Tracé invisible pour l'axe de gauche ax1.set_ylabel("Volume (L)", color='b') ax1.tick_params(axis='y', labelcolor='b') @@ -86,7 +86,7 @@ ax1.set_ylim(bottom=0, top=volume_max * 1000) # Limite de l'axe des volumes # Dates en abscisse ax1.xaxis.set_major_formatter(mdates.DateFormatter("%m/%Y")) # Format mois (numérique) année ax1.xaxis.set_major_locator(mdates.MonthLocator()) # Une graduation par mois -plt.xticks(rotation=45) +plt.xticks(rotation=90) # Deuxième axe pour les hauteurs de flèche ax2 = ax1.twinx() @@ -99,7 +99,7 @@ right_ticks_text = [f"{f:.0f}" for f in right_ticks_cm] # Texte des labels ax2.set_yticklabels(right_ticks_text) # Labels affichés ax2.set_ylim(bottom=0, top=2 * rayon_cuve) # Limite de l'axe des hauteurs -ax2.plot(dates, flèches, label="Hauteur de remplissage (cm)", color='r', linestyle='dashed', linewidth=2) +ax2.plot(dates, flèches, label="Hauteur de remplissage (cm)", color='r', linestyle='dashed', linewidth=2, alpha=0) # Tracé invisible pour l'axe de droite ax2.set_ylabel("Hauteur de remplissage (cm)", color='r') ax2.tick_params(axis='y', labelcolor='r')