小弟现在初学python,遇到一点小问题。现在要读取两行python数据来做图,第一行为横坐标,第二行为纵坐标。但是代码总是有问题,哪位大神给帮忙看一下,不胜感激!
filename = 'a.txt'
with open(filename, 'r') as f:
lines = f.readlines()
for line in lines:
t = line.split(lines[0])
s = line.split(lines[1])
self.axes.loglog(t[1:10], s[1:10])
self.axes.set_ylim(0.00001, 1)