Skip to content

Instantly share code, notes, and snippets.

@wibowotangara
Created January 23, 2024 14:26
Show Gist options
  • Save wibowotangara/08f2a770963d128bd1d21ad84760364f to your computer and use it in GitHub Desktop.
Save wibowotangara/08f2a770963d128bd1d21ad84760364f to your computer and use it in GitHub Desktop.
plt.figure(figsize=(10, 6))
bars = plt.bar(model_names, accuracies, color='skyblue')
for bar in bars:
yval = bar.get_height()
plt.text(bar.get_x() + bar.get_width()/2, yval, f'{yval:.2f}', ha='center', va='bottom')
plt.xlabel('Model')
plt.ylabel('Accuracy')
plt.title('Accuracy of Different Models')
plt.ylim(0.7, 1)
plt.xticks(rotation=45)
plt.tight_layout()
plt.axhline(0.9, color='black', linewidth=0.8)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment