diff --git a/Exec/science/massive_star/analysis/initial_model.py b/Exec/science/massive_star/analysis/initial_model.py index aecc03368d..d46cc5001b 100644 --- a/Exec/science/massive_star/analysis/initial_model.py +++ b/Exec/science/massive_star/analysis/initial_model.py @@ -10,9 +10,8 @@ def find_r_for_rho(r, rho, rho_want): return r[idx] -#file = "../15m_500_sec.aprox19.hse.6400" -file = "../15m_500_sec.aprox19.hse.20.0km" -Lx = 1.6384e10 +file = "../15m_500_sec.aprox19.hse.5.00km" +Lx = 8.192e9 data = np.loadtxt(file) @@ -65,6 +64,10 @@ def find_r_for_rho(r, rho, rho_want): ax.set_xlabel("r [cm]") ax.set_ylabel(r"$\rho~[\rm{g/cm^3}]$, $T~[K]$") + +ax.set_xlim(None, 5.e10) +ax.grid(color="b", alpha=0.5, ls=":") + ax2 = ax.twinx() ax2.set_ylabel(r"$Y_e$") @@ -74,8 +77,9 @@ def find_r_for_rho(r, rho, rho_want): lns = l1 + l2 + l3 labs = [l.get_label() for l in lns] -ax.legend(lns, labs, frameon=False) +ax.legend(lns, labs, frameon=False, loc=6) +# species plot ax = fig.add_subplot(212) @@ -92,15 +96,17 @@ def find_r_for_rho(r, rho, rho_want): if Xmax > threshold: if Xmax > 0.5: - lw = 2 + lw = 3 + ls = "-" else: lw = 1 - ax.plot(data[:,0], data[:,n], label=var, lw=lw) + ls = "--" + ax.plot(data[:,0], data[:,n], label=var, lw=lw, ls=ls) ax.axvline(r_refine, color="0.25", ls=":") -ax.axvline(Lx, color="0.25", ls="-") +ax.axvline(Lx, color="0.5", ls="-") ax.set_xscale("log") ax.set_yscale("log") @@ -108,11 +114,16 @@ def find_r_for_rho(r, rho, rho_want): ax.set_xlabel("r [cm]") ax.set_ylabel("mass fraction") -ax.legend(frameon=False, fontsize="small", ncol=2) +ax.set_xlim(None, 5.e10) +ax.set_ylim(1.e-6, None) + +ax.grid(color="b", alpha=0.5, ls=":") + +ax.legend(frameon=True, edgecolor="w", ncol=1, framealpha=0.5) fig.set_size_inches((8, 12)) fig.tight_layout() -fig.savefig("initial_model.png") +fig.savefig("initial_model.pdf")