Good afternoon, I'm learning python and I am making some graphics with a file with data, dates and times My first goal was to graphic the data vs time, Magnitude vs Fulltime, only Saturday and Sundays (d2 and w) vs time, and only the 11pm to 12md of Business Day (Hour and d4) vs time. And with all the happiness I did it. Now my second goal is to make another curve in ax[0,1].plot(w) and ax[1,1].plot(d4), but now with the accumulation of the data in w and d4. I know how to do another curve an existing graph, but i don't know how to plot the accumulation of the data in a variable like w and d4. How can I do it? Also if you see some things in Spanish, is because I live in Costa Rica.
fecha, hora, mag = np.loadtxt("Cat2019.event.cat", usecols=(0, 1, 5), unpack=True,
dtype="str")
mag = mag.astype(np.float)
Fulltime=[]
for i,f in enumerate(fecha):
temp = f'{f}T{hora[i]}'
temp2 = datetime.datetime.strptime(temp, '%Y%m%dT%H%M%S%f')
Fulltime.append(temp2)
ts = pd.Series(np.random.randint(0, 50, len(Fulltime)), index=Fulltime)
#Every Day
d = ts.resample('D').count()
#Now for Saturdays and Sundays
d2 = ts.resample('D').count()
w = d2[d2.index.dayofweek.isin([5,6])]
#Now for 23pm to 12md only in Business Days
Hour = ts.between_time("23:00", "12:00")
d4= Hour.resample("B").count()
Graphics
ax[0,0].plot(d)
ax[1,0].scatter(Fulltime, mag, s=1.0)
ax[0,1].plot(w)
ax[1,1].plot(d4)
Thank you
How we can insert header and footer in google docs with google docs api using PHP code
Writing a new and appending a file in PHP without erasing contents
How to combine 2 arrays with the condition that 2 and 5 values will be from the second array?
How to keep the ?error on url if page extension not included?
I can't get the Python program at https://githubcom/pcarbonn/pyDatalog/blob/master/pyDatalog/examples/graph
im trying to add a segmented tab to my header let me show you an example before i start
I am having a problem configuring jQueryLazy() to work with images that have been appended with a hash
I have such a code in PHP, but I need to rewrite it in C#Suggest any options please