41 lines
924 B
Python
41 lines
924 B
Python
import numpy as np
|
|
import matplotlib.pyplot as plt
|
|
|
|
import seaborn as sns
|
|
|
|
sns.set_theme()
|
|
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():
|
|
files = [
|
|
"data/probability_deviation_no_slits.txt",
|
|
"data/probability_deviation_slits.txt",
|
|
]
|
|
for file in files:
|
|
with open(file) as f:
|
|
lines = f.readlines();
|
|
x = []
|
|
arr = []
|
|
for line in lines:
|
|
tmp = line.strip().split("\t")
|
|
x.append(float(tmp[0]))
|
|
arr.append(float(tmp[1]))
|
|
|
|
plt.plot(x,arr)
|
|
|
|
plt.savefig("latex/images/probability_deviation.pdf")
|
|
|
|
if __name__ == "__main__":
|
|
plot()
|
|
|