Created
September 24, 2022 13:22
-
-
Save srang992/a3c6b5b21ed896c021cfb3d58a8698f1 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
fig, (ax1, ax2) = plt.subplots(ncols=2, figsize=(20, 7)) | |
df2 = pd.DataFrame(tiger_shark_case['victim_activity'].value_counts().reset_index()) | |
df2 = df2[df2['victim_activity'] > 10] | |
df3 = pd.DataFrame(wobbegong_shark_case['victim_activity'].value_counts().reset_index()) | |
df3 = df3[df3['victim_activity'] > 10] | |
ax1.pie(x='victim_activity', labels='index', autopct='%.1f%%', data=df2) | |
ax2.pie(x='victim_activity', labels='index', autopct='%.1f%%', data=df3) | |
ax1.set_title("Victim Activity for Tiger Shark", fontsize=18) | |
ax2.set_title("Victim Activity for Wobbegong Shark", fontsize=18) | |
fig.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment