python - Draw line with matplotlib (timeseries) -


im plotting big timeserie matplotlib, x-axis list of datetime.datetime objects (the way matplotlib wants x-axis) , list of float values, mean, normal timeserie.

using plot_date(dates,values) plot, checked values consecutive , fine, enter image description here

now want draw line instead, using same above plot_date(dates,values,fmt="-"): enter image description here

what happening? bug? im doing wrong?

zip dates , values list of tuples, sort (date, value) pairs, unzip pairs zip(*...), plot:

dates, values = zip(*sorted(zip(dates,values))) plot_date(dates,values, '-') 

Comments

Popular posts from this blog

objective c - Can't build GCM with Protobuf in Xcode -

Winapi c++: DialogBox hangs when breaking a loop -

How to use function view in Drupal -