0
import matplotlib.pyplot as plt
x=[]
y=[]
z=[]
dados=open('dados1.txt','r')
for line in dados:
line=line.strip()
X,Y,Z=line.split()
x.append(X)
y.append(Y)
z.append(Z)
dados.close()
plt.plot(x,y,'o')
plt.plot(x,z,'o')
plt.show()
I made a program that collects data from a txt file and generates a graph, but when generating the y-axis became strange.
What is the error? What is the desired behavior?
– Denis Rudnei de Souza
Hello, it is much easier to solve your problem if you tell us what your problem is (I believe it is the sorting of numbers on the y-axis, but make it clear that this is the problem). Besides, since we don’t have your data, it’s hard to reproduce this problem. It would be very nice to have a [mcve] to want to answer reproduce your problem.
– Guto