Formatting
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from os import makedirs
|
||||
from pathlib import Path
|
||||
|
||||
import matplotlib.pyplot as plt
|
||||
@@ -6,6 +7,9 @@ from scipy.stats import linregress
|
||||
|
||||
|
||||
def plot_phase_transition_alt(indir, outdir):
|
||||
if not (path := Path(outdir)).exists():
|
||||
makedirs(path)
|
||||
|
||||
files = [
|
||||
"size_20.txt",
|
||||
"size_40.txt",
|
||||
@@ -84,6 +88,9 @@ def plot_phase_transition_alt(indir, outdir):
|
||||
|
||||
|
||||
def plot_phase_transition(indir, outdir):
|
||||
if not (path := Path(outdir)).exists():
|
||||
makedirs(path)
|
||||
|
||||
files = [
|
||||
"size_20.txt",
|
||||
"size_40.txt",
|
||||
@@ -168,24 +175,24 @@ def plot_phase_transition(indir, outdir):
|
||||
|
||||
if __name__ == "__main__":
|
||||
plot_phase_transition_alt(
|
||||
"fox_output/phase_transition/wide/10M/",
|
||||
"data/fox/phase_transition/wide/10M/",
|
||||
"latex/images/phase_transition/fox/wide/10M/",
|
||||
)
|
||||
plot_phase_transition(
|
||||
"fox_output/phase_transition/wide/1M/",
|
||||
"data/fox/phase_transition/wide/1M/",
|
||||
"latex/images/phase_transition/fox/wide/1M/",
|
||||
)
|
||||
plot_phase_transition(
|
||||
"fox_output/phase_transition/narrow/10M/",
|
||||
"data/fox/phase_transition/narrow/10M/",
|
||||
"latex/images/phase_transition/fox/narrow/10M/",
|
||||
)
|
||||
plot_phase_transition(
|
||||
"output/phase_transition/", "latex/images/phase_transition/hp/"
|
||||
"data/hp/phase_transition/", "latex/images/phase_transition/hp/"
|
||||
)
|
||||
plot_phase_transition(
|
||||
"output/phase_transition/", "latex/images/phase_transition/hp/"
|
||||
"data/hp/phase_transition/", "latex/images/phase_transition/hp/"
|
||||
)
|
||||
plot_phase_transition(
|
||||
"output/phase_transition/",
|
||||
"data/hp/phase_transition/",
|
||||
"latex/images/phase_transition/hp/",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user