I have a txt file which contains the datas corresponding to every second in every single day from year 2016-2018(everyday concluding about over 1400 datas), firstly, I selected the datas on a specifical day: 05.01.2016, then I want to draw a graph in python using the day's datas
the following code is for selecting values and drawing graph:
if '01.05.2016' in row: #select the value in day 05.01.2016
x = [row.split()[6]]
y = [row.split()[2]]
fig = plt.figure()
ax1 = fig.add_subplot(111)
ax1.plot(x,y)
plt.ylim((200,800))
plt.show()
if I use the command:
x = [row.split()[6]]
y = [row.split()[2]]
print(x,y)
then the x and y come will successfully come out(just some pairs x-y values as example):
['01.05.2016/15:43:00'] ['499']
['01.05.2016/15:44:00'] ['501']
['01.05.2016/15:45:00'] ['502']
['01.05.2016/15:46:00'] ['502']
a part of my original txt.file is like:
01.05.2016 15:43:00 499 U 42491,65486 -0,01 01.05.2016/15:44:00
01.05.2016 15:44:00 501 U 42491,65556 0,01 01.05.2016/15:45:00
01.05.2016 15:45:00 502 U 42491,65625 0,02 01.05.2016/15:46:00
01.05.2016 15:46:00 503 U 42491,65694 0,03 01.05.2016/15:47:00
But if I continue to write the command for drawing graph. the graph only show one pair(the last one pair) x-y value, my graph is like:
who can help me maybe?

