Skip to content

Instantly share code, notes, and snippets.

@amankharwal

amankharwal/donut plot.py Secret

Created Dec 16, 2020
Embed
What would you like to do?
states = df3.state_name
active = df3.active
colours = ["skyblue", "blue", "red", "yellow", "green"]
plt.figure(figsize=(7,7))
plt.pie(active, labels=states, autopct='%1.1f%%', colors=colours)
central_circle = plt.Circle((0, 0), 0.4, color='white')
fig = plt.gcf()
fig.gca().add_artist(central_circle)
plt.rc('font', size=12)
plt.title("Top 5 Active cases", fontsize=20)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment