Skip to content

Instantly share code, notes, and snippets.

@kusal1990
Created June 2, 2022 18:10
Show Gist options
  • Save kusal1990/673dfc3cd49f4f180d0e1f56d64734d7 to your computer and use it in GitHub Desktop.
Save kusal1990/673dfc3cd49f4f180d0e1f56d64734d7 to your computer and use it in GitHub Desktop.
# https://www.w3resource.com/graphics/matplotlib/piechart/matplotlib-piechart-exercise-2.php
data = df_metadata_train['phase'].value_counts()
labels = ['Phase 0', 'Phase 1', 'Phase 3']
#colors = ["#1f77b4", "#ff7f0e", "#2ca02c"]
title = 'Count of signals distributed by phase'
plt.pie(data, labels=labels, shadow=True, startangle=90,autopct='%.1f%%')
plt.title(title, bbox={'facecolor':'0.8', 'pad':5})
plt.show()
@kusal1990
Copy link
Author

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment