ferro_para_aimantation.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/env python3
# -*- coding: utf-8 -*-
import imgen
imgen.setup()
import matplotlib.pyplot as plt
import numpy as np
X = np.linspace(0, 4, 200)
plt.plot(X, np.tanh(X), label="Quantique")
plt.plot(X, 1 / np.tanh(X) - 1/X, label="Classique", linestyle="dashed")
plt.xlabel(r'$x$')
plt.ylabel(r'$M(x) / M_s$')
plt.legend()
# Save
imgen.done(__file__)