python27 matplotlib: first and last element connected

前端 未结 5 1712
野趣味
野趣味 2020-12-17 00:08

Hi I have found the same problem but without an answer: enter link description here

My problem is that I try to plot data with the matplotlib and it connects the fir

5条回答
  •  我在风中等你
    2020-12-17 00:52

    I just had the same problem.

    In my case I was dealing with 365 days of the year. The indexing starts from 0 and ends at 365 while the day numbers start from 1 and end at 366 so the date corresponding to the 366th line was 1 and that's why there was a line connecting the end of plot to its beginning. I also needed to check for leap years because the data was collected from a period of 10 years.

提交回复
热议问题