Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created December 16, 2020 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/f3de86c7fec6910a738354848c12825c to your computer and use it in GitHub Desktop.
Save amankharwal/f3de86c7fec6910a738354848c12825c to your computer and use it in GitHub Desktop.
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