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

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

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -