python - matplotlib.fill_between not working with mdates -


i want create plot this: sample image

but in x_axis want display date. have array of datetime dates generate cycling through different values path_time:

           times.append(datetime.datetime.strptime(path_time,"%y%m%d_%h%m%s")) 

i can plot scatter points this:

for in range(1,np.size(times)):     plt.scatter(times[i],y[i],color='red') 

to plot errors, generate arrays y1 , y2 standard deviation of data y , want fill area in between.

plt.fill_between(times,y1,y2,where=y>0.4,alpha=0.4,color='blue') 

this works fine if x axis defined integer vales not if it's defined dates raises error:

typeerror: ufunc 'isfinite' not supported input types, , inputs not safely coerced supported types according casting rule ''safe''

any advice how solve problem or work around error bar plotted corresponding scatter point while still having date on x axis?

mdates work fill_between. problem after handling of dates, faced object. doesn't work.

if input x values list of dates, works fine.


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -