How to plot a data including date and time?

2019-08-13 Thread amirrezaheidarysbu
I have a .csv file, in first column I have date and hour, and in the second column I have energy use data. How can I make a bar chart with Date and time as the x axis and the energy use as the Y axis? Thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: How to plot a data including date and time?

2019-08-14 Thread amirrezaheidarysbu
On Tuesday, August 13, 2019 at 11:47:28 PM UTC+2, amirrezah...@gmail.com wrote: > I have a .csv file, in first column I have date and hour, and in the second > column I have energy use data. How can I make a bar chart with Date and time > as the x axis and the energy use as the Y axis? > > Thank

In following subplot I have to change the first plot into a bar plot. But using plt.bar rather than plt.plot gives a white plot !

2019-08-14 Thread amirrezaheidarysbu
plt.Figure() plt.subplots_adjust(top=0.945, bottom=0.05, left=0.04, right=0.985, hspace=0.67, wspace=0.345) plt.subplot(6,1,1) plt.plot(Date,Energy, "r") plt.title("Hourly hot water energy use") plt.ylabel("kWh") plt.margins(x=0) plt.subplot(6,1,2) plt.plot(Date,Tin) plt.title("Indoor air tem