import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
import numpy as np

filepath = "../datasets/universal_error/AllErrors/U3_4.csv"
df = pd.read_csv(filepath)
# reorder columns
df = df[['theta', 'phi', 'lam', 'E', 'depol_prob', 't1', 't2', 'p0_0', 'p0_1', 'p1_0', 'p1_1']]

# filter out inf values
df = df[np.isfinite]

df.info()

df.head()

sns.set(style='whitegrid', palette='deep', font_scale=1.1, rc={'figure.figsize': [8, 5]})
sns.distplot(df['E'], norm_hist=False, kde=False, bins=50, hist_kws={'alpha': 1}).set(xlabel="'Expected Value", ylabel='Count')

df.hist(bins=100, figsize=(20,15), layout=(3,4));

sns.scatterplot(x=df['theta'], y=df['E']);

sns.jointplot(x=df['theta'], y=df['E']);

sns.scatterplot(x=df['phi'], y=df['E']);

sns.scatterplot(x=df['lam'], y=df['E']);


sns.scatterplot(x=df['theta'], y=df['phi']); 

sns.scatterplot(x=df['depol_prob'], y=df['E']); 

sns.jointplot(x=df['t1'], y=df['E']); 

sns.jointplot(x=df['t2'], y=df['E']); 

sns.scatterplot(x=df['t1'], y=df['E']); 

sns.scatterplot(x=df['t2'], y=df['E']); 

### Pair Plots

sns.scatterplot(x=df['t2'], y=df['E']); 

sns.pairplot(data=df);


