There are football players from every league whose overall rating is more than 80.
I also created a bar graph which looks like this:
Code I have written is this:
plt.figure(figsize=(15,5))
plt.bar(grouped.short_name,grouped.overall)
plt.title("football players with 80+ rating")
plt.xticks(rotation=90)
plt.ylabel("overall rating")
plt.show()
But I want the graph to have columns of different colors based on the league player represents. For example: players from Seria A be Green, players from Bundesliga - Red and etc. I also want the graph to have legend which shows which color corresponds to which league. How can I do this?