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

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -