Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created June 24, 2021 11:51
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/da699b2cd6925d857501e91200b0f977 to your computer and use it in GitHub Desktop.
Save amankharwal/da699b2cd6925d857501e91200b0f977 to your computer and use it in GitHub Desktop.
a = data["Source"].value_counts().head()
index = a.index
sources = a.values
custom_colors = ["skyblue", "yellowgreen", 'tomato', "blue", "red"]
plt.figure(figsize=(5, 5))
plt.pie(sources, labels=index, colors=custom_colors)
central_circle = plt.Circle((0, 0), 0.5, color='white')
fig = plt.gcf()
fig.gca().add_artist(central_circle)
plt.rc('font', size=12)
plt.title("Top 5 Domains to Become a Billionaire", fontsize=20)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment