1import matplotlib.pyplot
as plt
5 "output/burn_in_time/unordered_1_0.txt",
6 "output/burn_in_time/ordered_1_0.txt",
7 "output/burn_in_time/unordered_2_4.txt",
8 "output/burn_in_time/ordered_2_4.txt",
16 figure1, ax1 = plt.subplots()
17 figure2, ax2 = plt.subplots()
19 for infile, label
in zip(files, labels):
20 with open(infile)
as f:
27 items = line.strip().split(
",")
28 t.append(int(items[0]))
29 energy.append(float(items[1]))
30 magnetization.append(float(items[5]))
32 ax1.plot(t, energy, label=fr
"$\langle \epsilon \rangle$ {label}")
33 ax2.plot(t, magnetization, label=fr
"$\langle | m | \rangle$ {label}")
36 figure1.savefig(
"../latex/images/burn_in_time_energy.pdf")
38 figure2.savefig(
"../latex/images/burn_in_time_magnetization.pdf")
43if __name__ ==
"__main__":
int main()
The main function.