Skip to content

Instantly share code, notes, and snippets.

Created May 28, 2021
What would you like to do?
import matplotlib as mpl
game = data.groupby("Genre")["Global_Sales"].count().head(10)
custom_colors = mpl.colors.Normalize(vmin=min(game), vmax=max(game))
colours = [ for i in game]
plt.pie(game, labels=game.index, colors=colours)
central_circle = plt.Circle((0, 0), 0.5, color='white')
fig = plt.gcf()
plt.rc('font', size=12)
plt.title("Top 10 Categories of Games Sold", fontsize=20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment