Produced plot with correct layout
This commit is contained in:
parent
90047decb4
commit
eb589ee768
BIN
latex/images/pd_estimate_1_0.pdf
Normal file
BIN
latex/images/pd_estimate_1_0.pdf
Normal file
Binary file not shown.
BIN
latex/images/pd_estimate_2_4.pdf
Normal file
BIN
latex/images/pd_estimate_2_4.pdf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
latex/images/timing/lattice_size.pdf
Normal file
BIN
latex/images/timing/lattice_size.pdf
Normal file
Binary file not shown.
BIN
latex/images/timing/sample_sizes.pdf
Normal file
BIN
latex/images/timing/sample_sizes.pdf
Normal file
Binary file not shown.
@ -149,17 +149,18 @@ sharper when we increase lattice size, we are moving closer to the critical temp
|
|||||||
Based on the heat capacity (Figure \ref{fig:phase_heat_10M}) and susceptibility
|
Based on the heat capacity (Figure \ref{fig:phase_heat_10M}) and susceptibility
|
||||||
(Figure \ref{fig:phase_susceptibility_10M}), we estimated the critical temperatures
|
(Figure \ref{fig:phase_susceptibility_10M}), we estimated the critical temperatures
|
||||||
of lattices of size $L \in \{20, 40, 60, 80, 100\}$ found in Table \ref{tab:critical_temperatures}.
|
of lattices of size $L \in \{20, 40, 60, 80, 100\}$ found in Table \ref{tab:critical_temperatures}.
|
||||||
|
% Tc wide 10M = 2.37, 2.325, 2.3025, 2.295, 2.2875
|
||||||
\begin{table}[H]
|
\begin{table}[H]
|
||||||
\centering
|
\centering
|
||||||
\begin{tabular}{cc} % @{\extracolsep{\fill}}
|
\begin{tabular}{cc} % @{\extracolsep{\fill}}
|
||||||
\hline
|
\hline
|
||||||
$L$ & $T_{c}(L)$ \\
|
$L$ & $T_{c}(L)$ \\
|
||||||
\hline
|
\hline
|
||||||
$20$ & $ J / k_{B}$ \\
|
$20$ & $2.37 J / k_{B}$ \\
|
||||||
$40$ & $ J / k_{B}$ \\
|
$40$ & $2.325 J / k_{B}$ \\
|
||||||
$60$ & $ J / k_{B}$ \\
|
$60$ & $2.3025 J / k_{B}$ \\
|
||||||
$80$ & $ J / k_{B}$ \\
|
$80$ & $2.295 J / k_{B}$ \\
|
||||||
$100$ & $ J / k_{B}$ \\
|
$100$ & $2.2875 J / k_{B}$ \\
|
||||||
\hline
|
\hline
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
\caption{Estimated critical temperatures for lattices $L \times L$, where $L$ denote the lattice size.}
|
\caption{Estimated critical temperatures for lattices $L \times L$, where $L$ denote the lattice size.}
|
||||||
@ -172,16 +173,16 @@ we plot the critical temperatures $T_{c}(L)$ of the inverse lattice size $1/L$.
|
|||||||
the lattice size increase toward infinity, $1/L$ approaches zero. %
|
the lattice size increase toward infinity, $1/L$ approaches zero. %
|
||||||
\begin{figure}[H]
|
\begin{figure}[H]
|
||||||
\centering
|
\centering
|
||||||
\includegraphics[width=\linewidth]{../images/phase_transition/fox/wide/10M/linreg.pdf}
|
\includegraphics[width=\linewidth]{../images/phase_transition/fox/wide/1M/linreg.pdf}
|
||||||
\caption{Linear regression, where $\beta_{0}$ is the intercept approximating $T_{c}(L = \infty)$, and $\beta_{1}$ is the slope.}
|
\caption{Linear regression, where $\beta_{0}$ is the intercept approximating $T_{c}(L = \infty)$, and $\beta_{1}$ is the slope.}
|
||||||
\label{fig:linreg_10M}
|
\label{fig:linreg_10M}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
Using linear regression, we find the intercept which gives us an estimated value
|
We used linear regression to find the intercept $\beta_{0}$, which gives us an estimated value
|
||||||
of the critical temperature for a lattice of infinite size. We find the critical
|
of the critical temperature for a lattice of infinite size. The estimated critical temperature
|
||||||
temperature to be $T_{c \text{num}} \approx 2.2695 J/k_{B}$. We also compared the
|
is $T_{c \text{num}} \approx 2.2693 J/k_{B}$. We also compared the
|
||||||
estimate with the analytical solution, the relative error of our estimate is
|
estimate with the analytical solution, the relative error of our estimate is
|
||||||
\begin{equation*}
|
\begin{equation*}
|
||||||
\text{Relative error} = \frac{T_{c \text{ numerical}} - T_{c \text{ analytical}}}{T_{c \text{ analytical}}} \approx 0.001 J/k_{B}
|
\text{Relative error} = \frac{T_{c \text{ numerical}} - T_{c \text{ analytical}}}{T_{c \text{ analytical}}} \approx 5.05405 \cdot 10^{-5} J/k_{B}
|
||||||
\end{equation*}
|
\end{equation*}
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|||||||
@ -212,7 +212,7 @@ def plot_phase_transition(indir, outdir):
|
|||||||
ax4.set_ylabel(r"$\chi$ $(1/J)$")
|
ax4.set_ylabel(r"$\chi$ $(1/J)$")
|
||||||
ax4.legend(title="Lattice size", loc="upper right")
|
ax4.legend(title="Lattice size", loc="upper right")
|
||||||
|
|
||||||
# ax5.legend()
|
# print(Tc)
|
||||||
|
|
||||||
figure1.savefig(Path(outdir, "energy.pdf"), bbox_inches="tight")
|
figure1.savefig(Path(outdir, "energy.pdf"), bbox_inches="tight")
|
||||||
figure2.savefig(Path(outdir, "magnetization.pdf"), bbox_inches="tight")
|
figure2.savefig(Path(outdir, "magnetization.pdf"), bbox_inches="tight")
|
||||||
@ -228,7 +228,7 @@ def plot_phase_transition(indir, outdir):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
plot_phase_transition_alt(
|
plot_phase_transition(
|
||||||
"data/fox/phase_transition/wide/10M/",
|
"data/fox/phase_transition/wide/10M/",
|
||||||
"latex/images/phase_transition/fox/wide/10M/",
|
"latex/images/phase_transition/fox/wide/10M/",
|
||||||
)
|
)
|
||||||
|
|||||||
@ -2,6 +2,20 @@ from os import makedirs
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import matplotlib.pyplot as plt
|
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_timing(indir, outdir):
|
def plot_timing(indir, outdir):
|
||||||
@ -35,9 +49,9 @@ def plot_timing(indir, outdir):
|
|||||||
ax1.set_xlabel(xlabel)
|
ax1.set_xlabel(xlabel)
|
||||||
ax1.set_ylabel("time (seconds)")
|
ax1.set_ylabel("time (seconds)")
|
||||||
|
|
||||||
figure1.legend()
|
ax1.legend()
|
||||||
|
|
||||||
figure1.savefig(Path(outdir, outfile))
|
figure1.savefig(Path(outdir, outfile), bbox_inches="tight")
|
||||||
|
|
||||||
plt.close(figure1)
|
plt.close(figure1)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user