modifications cosmétiques
This commit is contained in:
parent
28c8b4cb86
commit
cd692bc79a
1 changed files with 5 additions and 5 deletions
|
@ -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')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue