There are 2 arrays x - is in ascending order, y - chaotic. How display Y in ascendung order, but save (x,y)
import numpy as np
import matplotlib.pyplot as plt
x=[]
with open('D:\Programming\Contest\stepperf.txt','r') as a:
for line in a:
x.append(line.strip())
x =np.array(x)
y=[]
with open('D:\Programming\Contest\Hall.txt','r') as b:
for line in b:
y.append(line.strip())
y = np.array(y)
fig, ax = plt.subplots(figsize=(8, 6))
plt.grid()
plt.plot(x,y)
plt.show()