import matplotlib.pyplot as plt
from MMM2 import main_pr

def plot_signals(X, X1):
    plt.figure()
    plt.plot(X, label='X',marker='o', linestyle='-')
    plt.plot(X1, label='X1',marker='s', linestyle='--')
    plt.title('Сравнение исходного и исправленного сигналов')
    plt.legend()
    plt.grid(True)
    plt.show()


if __name__ == "__main__":
    result = main_pr()
    if result:
        X, X1 = result if result[1] is not None else (result[0], None)
        plot_signals(X, X1)
