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, 
now want draw line instead, using same above plot_date(dates,values,fmt="-"): 
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
Post a Comment