Matplotlib 线条不断出现在我的图表中。为什么会这样?我怎样才能摆脱它们?

Matplotlib 线条不断出现在我的图表中。为什么会这样?我怎样才能摆脱它们?,matplotlib,bar-chart,Matplotlib,Bar Chart,#这是我所有的代码在这一点上,不知道为什么线显示在我的图表上 原因可能在数据中,所以为什么不尽可能地发布数据呢?可能是x值重复,并且许多条都是用相同的x位置绘制的。在这种情况下,熊猫或海洋生物绘图提供了更多的选择。 role = DMGC_combined_df['Primary Role'] wins = DMGC_combined_df['wins'] plt.bar(role,wins) plt.xlabel("Primary Role") plt.ylabel

#这是我所有的代码在这一点上,不知道为什么线显示在我的图表上


原因可能在数据中,所以为什么不尽可能地发布数据呢?可能是x值重复,并且许多条都是用相同的x位置绘制的。在这种情况下,熊猫或海洋生物绘图提供了更多的选择。
role = DMGC_combined_df['Primary Role']

wins = DMGC_combined_df['wins']

plt.bar(role,wins)

plt.xlabel("Primary Role")

plt.ylabel("Wins")

plt.title('Wins per Primary Role in Top 4 Tiers')

plt.show()