I have a task, trying to draw plot
where x is year and y is the value of games, released this year. Also, I have information about game platforms. So I want to draw 10 different lines of 10 different colors. I need to do it via for cycle. If I draw it without hue param - lines have different colors, but if I add it, all lines become blue.
Code is on screenshot via the link.
for platform in top10_platofrm_sales_dict:
sns.lineplot(
data=pivot_top_10
.query('platform == @platform and year_of_release !=0 '),
x='year_of_release',
y='name',
hue = 'platform'
)
plt.gcf().set_size_inches(16, 8)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…