Plotting time series and bar plots using matplotlib in python