import numpy as np
import matplotlib.pyplot as plt


#nacteni souboru pro tvorbu grafu - 35, 40, 45, 55, 70
lines1 = np.loadtxt("pneu4_35.dat", comments="#", delimiter=",", unpack=False)
lines2 = np.loadtxt("pneu4_40.dat", comments="#", delimiter=",", unpack=False)
lines3 = np.loadtxt("pneu4_45.dat", comments="#", delimiter=",", unpack=False)
lines4 = np.loadtxt("pneu4_55.dat", comments="#", delimiter=",", unpack=False)
lines5 = np.loadtxt("pneu4_70.dat", comments="#", delimiter=",", unpack=False)

fig, axes = plt.subplots(5, 1)
fig = plt.ylabel('ADC [-]')
xlim = 110
x = np.arange(0.0, 100, 0.1)

#axes[0].plot(x,lines6, label = "Reálný signál")
axes[0].plot(x,lines1, label = "Sim. signál 35°")
#axes[0].set_title("Porovnání simulovaných signálů pro různé úhly")
axes[0].set_title("Pneumatika č.4 275/70 R22,5")
axes[0].set_xlim([0,xlim])
axes[0].legend()
axes[0].set_ylabel('ADC [-]')
axes[0].grid()

axes[1].plot(x,lines2, label = "Sim. signál 40°")
axes[1].set_xlim([0,xlim])
axes[1].legend()
axes[1].set_ylabel('ADC [-]')
axes[1].grid()

axes[2].plot(x,lines3, label = "Sim. signál 45°")
axes[2].set_xlim([0,xlim])
axes[2].legend()
axes[2].set_ylabel('ADC [-]')
axes[2].grid()

axes[3].plot(x,lines4, label = "Sim. signál 55°")
axes[3].set_xlim([0,xlim])
axes[3].legend()
axes[3].set_ylabel('ADC [-]')
axes[3].grid()

axes[4].plot(x,lines5, label = "Sim. signál 70°")
axes[4].set_xlim([0,xlim])
axes[4].legend()
axes[4].set_ylabel('ADC [-]')
axes[4].grid()

plt.xlabel('t [ms]')
plt.ylabel('ADC [-]')

plt.show()