import numpy as np
import matplotlib.pyplot as plt
import matplotlib
from matplotlib.animation import FuncAnimation
import ast

import seaborn as sns 
params = {
    "font.family": "Serif",
    "font.serif": "Roman",
    "text.usetex": True,
    "axes.titlesize": "large",
    "axes.labelsize": "large",
    "xtick.labelsize": "large",
    "ytick.labelsize": "large",
    "legend.fontsize": "medium",
}
plt.rcParams.update(params)

def plot():
    with open("data/probability_deviation.txt") as f:
        lines = f.readlines();
        x = []
        arr_narrow = []
        arr_wide = []
        for line in lines:
            tmp = line.strip().split(",")
            x.append(float(tmp[0]))
            arr_narrow.append(float(tmp[1]))
            arr_wide.append(float(tmp[2]))

        
        plt.plot(x,arr_narrow)
        plt.plot(x,arr_wide)
        plt.savefig("latex/images/probability_deviation.pdf")

if __name__ == "__main__":
    plot()

