Compare commits
1 Commits
dev
...
c409dfb7d1
Author | SHA1 | Date | |
---|---|---|---|
c409dfb7d1 |
@ -44,17 +44,23 @@ for i, group in enumerate(groupings):
|
|||||||
|
|
||||||
plt.figure()
|
plt.figure()
|
||||||
bars = plt.bar(group_labels, group_means, color=colors)
|
bars = plt.bar(group_labels, group_means, color=colors)
|
||||||
|
|
||||||
|
# Oblicz maksymalną wartość, by zwiększyć wysokość osi Y
|
||||||
|
max_val = max(group_means)
|
||||||
|
plt.ylim(0, max_val * 1.15) # dodaj 15% zapasu na tekst
|
||||||
|
|
||||||
plt.ylabel("Średni czas wdrożenia (sek)")
|
plt.ylabel("Średni czas wdrożenia (sek)")
|
||||||
plt.title(f"Porównanie średnich czasów wdrożenia")
|
plt.title(f"Porównanie średnich czasów wdrożenia")
|
||||||
plt.xticks(rotation=45)
|
plt.xticks(rotation=45)
|
||||||
|
|
||||||
# Dodanie wartości na słupkach
|
# Dodanie wartości nad słupkami
|
||||||
for bar in bars:
|
for bar in bars:
|
||||||
yval = bar.get_height()
|
yval = bar.get_height()
|
||||||
plt.text(bar.get_x() + bar.get_width()/2.0, yval + 2, f'{yval:.1f}', ha='center', va='bottom', fontsize=9)
|
plt.text(bar.get_x() + bar.get_width()/2.0, yval + max_val * 0.02, f'{yval:.1f}',
|
||||||
|
ha='center', va='bottom', fontsize=9)
|
||||||
|
|
||||||
plt.tight_layout()
|
plt.tight_layout()
|
||||||
plt.savefig(f"{output_folder}/mean_times_{i}.png")
|
plt.savefig(f"{output_folder}/mean_times_{i}.png")
|
||||||
plt.close()
|
plt.close()
|
||||||
|
|
||||||
print("Wykresy zapisane!")
|
print("Wszystkie wykresy wygenerowane z dodatkowymi marginesami!")
|
||||||
|
Reference in New Issue
Block a user