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
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.