10 lines
No EOL
428 B
Python
10 lines
No EOL
428 B
Python
import matplotlib.pyplot as plt
|
|
|
|
plt.figure(figsize=(12.8, 9.6))
|
|
plt.bar(x=["a\nK=2","b\nK=3","c\nK=2","d\nK=3","e\nK=2","f\nK=3","g\nK=2"], height=[1,5,4,3,2,1,7], width=0.25, color=["magenta"])
|
|
plt.xlabel("Nombre de clusters (valeur K)")
|
|
plt.ylabel("Score de calinski_harabasz")
|
|
plt.title("Score de calinski_harabasz en fonction du nombre de clusters\nFichier: ")
|
|
# plt.savefig("test.png", dpi="figure")
|
|
plt.show()
|
|
plt.close() |