(plotfiles, xmin, xmax)
| 29 | |
| 30 | |
| 31 | def doit(plotfiles, xmin, xmax): |
| 32 | |
| 33 | f = plt.figure() |
| 34 | f.set_size_inches(7.0, 9.0) |
| 35 | |
| 36 | ax_T = f.add_subplot(311) |
| 37 | ax_e = f.add_subplot(312) |
| 38 | ax_he = f.add_subplot(313) |
| 39 | |
| 40 | for p in plotfiles: |
| 41 | if plotfiles[p] is None: |
| 42 | continue |
| 43 | |
| 44 | time, x, T, enuc, rho_he4 = get_Te_profile(plotfiles[p]) |
| 45 | |
| 46 | ax_T.plot(x, T, label=p) |
| 47 | ax_e.plot(x, enuc) |
| 48 | ax_he.plot(x, rho_he4) |
| 49 | |
| 50 | ax_T.legend(frameon=False) |
| 51 | |
| 52 | ax_T.set_ylabel(r"$T$ (K)") |
| 53 | ax_e.set_ylabel(r"$H_\mathrm{nuc}$ (erg/g/s)") |
| 54 | ax_he.set_ylabel(r"$\rho X({}^4\mathrm{He})$ (g/cm${}^3$)") |
| 55 | ax_he.set_xlabel("x (cm)") |
| 56 | |
| 57 | ax_e.set_yscale("log") |
| 58 | ax_he.set_yscale("log") |
| 59 | |
| 60 | ax_T.set_xlim(left=xmin, right=xmax) |
| 61 | ax_e.set_xlim(left=xmin, right=xmax) |
| 62 | ax_he.set_xlim(left=xmin, right=xmax) |
| 63 | |
| 64 | f.tight_layout() |
| 65 | |
| 66 | f.savefig("det.png") |
| 67 | |
| 68 | |
| 69 | if __name__ == "__main__": |
no test coverage detected