mirror of
https://codeberg.org/Yael-II/MSc2-Project-Chaos.git
synced 2026-03-15 04:16:26 +01:00
changed Figs directory
This commit is contained in:
@@ -61,7 +61,7 @@ def plot_area(filelist: list, mu_c = 1e-4) -> int:
|
|||||||
ax.set_ylabel("Phase-space squared distance $\\mu$")
|
ax.set_ylabel("Phase-space squared distance $\\mu$")
|
||||||
ax.set_yscale("log")
|
ax.set_yscale("log")
|
||||||
ax.legend()
|
ax.legend()
|
||||||
fig.savefig("mu.pdf")
|
fig.savefig("Figs/mu.pdf")
|
||||||
|
|
||||||
fig, ax = plt.subplots(1)
|
fig, ax = plt.subplots(1)
|
||||||
N_reg = np.count_nonzero(mu < mu_c, axis=1)
|
N_reg = np.count_nonzero(mu < mu_c, axis=1)
|
||||||
@@ -70,7 +70,7 @@ def plot_area(filelist: list, mu_c = 1e-4) -> int:
|
|||||||
ax.scatter(E, Area, s=5, color="C0")
|
ax.scatter(E, Area, s=5, color="C0")
|
||||||
ax.set_xlabel("Energy $E$")
|
ax.set_xlabel("Energy $E$")
|
||||||
ax.set_ylabel("Area $N_\\mathrm{{reg}}/N_\\mathrm{{part}}$")
|
ax.set_ylabel("Area $N_\\mathrm{{reg}}/N_\\mathrm{{part}}$")
|
||||||
fig.savefig("area.pdf")
|
fig.savefig("Figs/area.pdf")
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
filelist = [f for f in os.listdir(OUT_DIR) if FILENAME_PREFIX in f]
|
filelist = [f for f in os.listdir(OUT_DIR) if FILENAME_PREFIX in f]
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ def plot_poincare_sections(filelist: list, title:str = "") -> int:
|
|||||||
if "linear" in title: kind = "linear"
|
if "linear" in title: kind = "linear"
|
||||||
elif "parallel" in title: kind = "parallel"
|
elif "parallel" in title: kind = "parallel"
|
||||||
else: kind = "error"
|
else: kind = "error"
|
||||||
fig.savefig("pcs_{}.pdf".format(kind))
|
fig.savefig("Figs/pcs_{}.pdf".format(kind))
|
||||||
return 0
|
return 0
|
||||||
print("\033[32m"
|
print("\033[32m"
|
||||||
+ "[P]arallel or [L]inear algorithm result, or [B]oth?"
|
+ "[P]arallel or [L]inear algorithm result, or [B]oth?"
|
||||||
|
|||||||
@@ -70,9 +70,9 @@ def plot_poincare_sections(filelist: list, title:str = "") -> int:
|
|||||||
if "linear" in title: kind = "linear"
|
if "linear" in title: kind = "linear"
|
||||||
elif "parallel" in title: kind = "parallel"
|
elif "parallel" in title: kind = "parallel"
|
||||||
else: kind = "error"
|
else: kind = "error"
|
||||||
fig1.savefig("pcs_zoom_1_{}.pdf".format(kind))
|
fig1.savefig("Figs/pcs_zoom_1_{}.pdf".format(kind))
|
||||||
fig2.savefig("pcs_zoom_2_{}.pdf".format(kind))
|
fig2.savefig("Figs/pcs_zoom_2_{}.pdf".format(kind))
|
||||||
fig3.savefig("pcs_zoom_3_{}.pdf".format(kind))
|
fig3.savefig("Figs/pcs_zoom_3_{}.pdf".format(kind))
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
print("\033[32m"
|
print("\033[32m"
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ if __name__ == "__main__":
|
|||||||
ax.set_ylabel("$y$")
|
ax.set_ylabel("$y$")
|
||||||
ax.set_aspect("equal")
|
ax.set_aspect("equal")
|
||||||
|
|
||||||
plt.savefig("evolution.png")
|
plt.savefig("Figs/evolution.png")
|
||||||
|
|
||||||
plt.show(block=True)
|
plt.show(block=True)
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ if __name__ == "__main__":
|
|||||||
ax.set_ylabel("$y$")
|
ax.set_ylabel("$y$")
|
||||||
ax.set_aspect("equal")
|
ax.set_aspect("equal")
|
||||||
|
|
||||||
fig.savefig("initial_E.png")
|
fig.savefig("Figs/initial_E.png")
|
||||||
|
|
||||||
plt.show(block=True)
|
plt.show(block=True)
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ def kepler(W):
|
|||||||
ax.set_xlabel("$x$")
|
ax.set_xlabel("$x$")
|
||||||
ax.set_ylabel("$y$")
|
ax.set_ylabel("$y$")
|
||||||
|
|
||||||
fig.savefig("pot_kepler.png")
|
fig.savefig("Figs/pot_kepler.png")
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def hh(W):
|
def hh(W):
|
||||||
@@ -49,7 +49,7 @@ def hh(W):
|
|||||||
ax.set_xlabel("$x$")
|
ax.set_xlabel("$x$")
|
||||||
ax.set_ylabel("$y$")
|
ax.set_ylabel("$y$")
|
||||||
|
|
||||||
fig.savefig("pot_hh.png")
|
fig.savefig("Figs/pot_hh.png")
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Reference in New Issue
Block a user