Created
May 11, 2022 21:06
-
-
Save Zmey56/2fd4e130efae57621f8b579d878f7a6b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
color_pie = ['Grey', 'Purple', 'Blue', 'Green', 'Orange', 'Red', 'Yellow', 'magenta', 'cyan'] | |
color_pie_dict = dict(zip(df_weights_circle.columns, color_pie)) | |
fig, axes = plt.subplots(2, 2, figsize=(15, 10)) | |
for i, (idx, row) in enumerate(df_weights_circle.iterrows()): | |
ax = axes[i//2, i%2] | |
row = row[row.gt(row.sum() * .01)] | |
ax.pie(row, labels=row.index, colors=[color_pie_dict.get(i) for i in row.index], startangle=30) | |
ax.set_title(idx) | |
fig.subplots_adjust(wspace=.2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment