matplotlib: data points connected in wrong order in line graph

后端 未结 1 1626
猫巷女王i
猫巷女王i 2020-12-19 08:32

I\'m reading a pandas dataframe, and trying to generate a plot from it. In the plot, the data points seem to be getting connected in an order determined by ascending y value

相关标签:
1条回答
  • 2020-12-19 09:02

    Is the order of values in COL1 different from the csv?

    You can sort by COL1 first, add this before plotting:

    data.sort('COL1', inplace=True)
    
    0 讨论(0)
提交回复
热议问题