这是代码:
fig=plt.figure(figsize=(14,8))
sns.lineplot(x='season', y='team_strikerate', hue='batting_team', data=overall_batseason)
plt.legend(title = 'Teams', loc = 1, fontsize = 12)
plt.xlim([2008,2022])
Run Code Online (Sandbox Code Playgroud)
只是为了让您知道,我已经在此之上绘制了另一个类似的线图。