import matplotlib.pyplot as plt, numpy as np

def readfile(filename):
    with open(filename, 'r') as file:
        x_points = [float(x) for x in file.readline().split()]
        y_points = [float(x) for x in file.readline().split()]

    return x_points, y_points

temp, slag = readfile('oving5_data.txt')
plt.plot(temp,slag)
plt.savefig('oving5_plot')
print((max(temp)+min(temp))/2)
plt.show()
