Loading...
Searching...
No Matches
2x2_analysis.py
import matplotlib.pyplot as plt
def plot_from_file():
figure, ax = plt.subplots()
with open("output/2_lattice_test.txt") as f:
lines = f.readlines()
t = []
energy = []
magnetization = []
for line in lines:
items = line.strip().split(",")
t.append(int(items[0]))
energy.append(float(items[1]))
magnetization.append(float(items[5]))
ax.plot(t, energy, label=f"<epsilon> {label}")
ax.plot(t, magnetization, label=f"<|m|> {label}")
figure.legend()
figure.savefig("../latex/images/2x2_analysis.pdf")
def main():
plot_from_file()
if __name__ == "__main__":
main()
main
int main()
The main function.
Definition: main.cpp:20