Re: fopen() and open() in cpython

2019-08-14 Thread Windson Yang
Thank you so much for the answer, now it makes sense :D eryk sun 于2019年8月15日周四 上午12:27写道: > On 8/13/19, Windson Yang wrote: > > After my investigation, I found Since Python maintains its own buffer > when > > read/write files, the build-in python open() function will call the > open() > > syste

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

Re: fopen() and open() in cpython

2019-08-14 Thread eryk sun
On 8/13/19, Windson Yang wrote: > After my investigation, I found Since Python maintains its own buffer when > read/write files, the build-in python open() function will call the open() > system call instead of calling standard io fopen() for caching. So when we > read/write a file in Python, it

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

2019-08-14 Thread George Fischhof
Elliott Roper ezt írta (időpont: 2019. aug. 14., Sze 15:56): > On 14 Aug 2019, Elliott Roper wrote > (in article<0001hw.23044901039e772c7ca97...@news.giganews.com>): > > > On 14 Aug 2019, amirrezaheidary...@gmail.com wrote > > (in article<23d45668-fa47-4640-832a-5a5c64600...@googlegroups.com>

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

2019-08-14 Thread Elliott Roper
On 14 Aug 2019, Elliott Roper wrote (in article<0001hw.23044901039e772c7ca97...@news.giganews.com>): > On 14 Aug 2019, amirrezaheidary...@gmail.com wrote > (in article<23d45668-fa47-4640-832a-5a5c64600...@googlegroups.com>): > > > On Tuesday, August 13, 2019 at 11:47:28 PM UTC+2, amirrezah...@

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

2019-08-14 Thread Elliott Roper
On 14 Aug 2019, amirrezaheidary...@gmail.com wrote (in article<23d45668-fa47-4640-832a-5a5c64600...@googlegroups.com>): > 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 h

Re: Create multiple sqlite tables, many-to-many design

2019-08-14 Thread Rich Shepard
On Wed, 14 Aug 2019, Chris Angelico wrote: I prefer to say "Trails" for the table, and "Trail" would then refer to a single row from that table. +1 Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Create multiple sqlite tables, many-to-many design

2019-08-14 Thread Chris Angelico
On Wed, Aug 14, 2019 at 9:06 PM Gregory Ewing wrote: > > MRAB wrote: > > Another thing you might want to avoid is naming something with what it > > is, e.g. "Trails_Table" (why not just "Trails"). > > Or possibly just "Trail", since any table potentially contains > multiple rows, so making all you

Re: Create multiple sqlite tables, many-to-many design

2019-08-14 Thread Gregory Ewing
MRAB wrote: Another thing you might want to avoid is naming something with what it is, e.g. "Trails_Table" (why not just "Trails"). Or possibly just "Trail", since any table potentially contains multiple rows, so making all your table names plural doesn't add any information. -- Greg -- https:

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