Why pyplot(matplotlib) is joining points randomly?

前端 未结 1 1598
南笙
南笙 2020-12-22 06:29

Why is pyplot joining points randomly when I run this code?

def plot_date_value(single_data_frame):
    date_axis_data = []
    value_axis_data = []
    date_         


        
相关标签:
1条回答
  • 2020-12-22 07:10

    It connects the points in the order given. Your dates are not sorted.

    Try changing the for loop to:

        for item in sorted(single_data_frame):
    
    0 讨论(0)
提交回复
热议问题