Esempio n. 1
0
def main():
    """ 
	Produces the figure and saves it as a PDF. 
	"""
    plt.clf()
    axes = setup_axes()
    plot_oscillatory(axes,
                     vice.output("../../simulations/SFRoscil_amp0p3_per2"),
                     "crimson")
    plot_oscillatory(axes,
                     vice.output("../../simulations/SFEoscil_amp0p2_per2"),
                     "deepskyblue")
    plot_pdf(axes[-1], vice.output("../../simulations/SFRoscil_amp0p3_per2"),
             "crimson")
    plot_pdf(axes[-1], vice.output("../../simulations/SFEoscil_amp0p2_per2"),
             "deepskyblue")
    axes[2].text(0.14,
                 150,
                 r"%g $\leq$ [Fe/H] $\leq$ %g" % (_FEH_MIN_, _FEH_MAX_),
                 fontsize=25)
    legend(axes[1])
    plt.tight_layout()
    visuals.yticklabel_formatter(axes[2])
    plt.savefig(sys.argv[1])
    plt.clf()
def main():
    """ 
	Produces the figure and saves it as a PDF. 
	"""
    plt.clf()
    axes = setup_axes()
    visuals.plot_output_4axes(axes,
                              "../../simulations/sudden_5Gyr_5e9Msun_schmidt",
                              "crimson", "O")
    visuals.plot_output_4axes(
        axes, "../../simulations/sudden_5Gyr_5e9Msun_ts1p0_schmidt",
        "deepskyblue", "O")
    visuals.plot_output_4axes(axes,
                              "../../simulations/sudden_5Gyr_5e9Msun",
                              "black",
                              "O",
                              second_linestyle=':')
    visuals.plot_track_points_intervals(
        axes[2], vice.history("../../simulations/sudden_5Gyr_5e9Msun"))
    visuals.sfr_ifr_legend(axes[0])
    visuals.legend(axes[2], ["black", "crimson", "deepskyblue"], [
        r"$\tau_*\propto M_\text{g}^0$ \qquad$\tau_\text{s}$ = 0",
        r"$\tau_*\propto M_\text{g}^{-1/2}$\quad$\tau_\text{s}$ = 0",
        r"$\tau_*\propto M_\text{g}^{-1/2}$\quad$\tau_\text{s}$ = 1 Gyr"
    ])
    plot_ifr(axes[0], "../../simulations/sudden_5Gyr_5e9Msun_schmidt",
             "crimson")
    plot_ifr(axes[0], "../../simulations/sudden_5Gyr_5e9Msun_ts1p0_schmidt",
             "deepskyblue")
    plot_ifr(axes[0], "../../simulations/sudden_5Gyr_5e9Msun", "black")
    plt.tight_layout()
    visuals.yticklabel_formatter(axes[3])
    plt.savefig(sys.argv[1])
    plt.clf()
Esempio n. 3
0
def main():
    """ 
	Produces the figure and saves it as a PDF. 
	"""
    plt.clf()
    axes, insets = setup_axes()
    plot_oscillatory_infall_model(axes[1], insets[1])
    plot_oscillatory_eff_model(axes[0], insets[0])
    plt.tight_layout()
    plt.subplots_adjust(right=0.985)
    for i in range(2):
        visuals.yticklabel_formatter(axes[i][-1])
    plt.savefig(sys.argv[1])
    plt.clf()
def main():
    """ 
	Produces the figure and save it as a PDF. 
	"""
    plt.clf()
    axes = setup_axes()
    plot_gas_driven_models(axes[0])
    plot_eff_driven_models(axes[1])
    visuals.legend(axes[0][1], ["black", "crimson", "deepskyblue"],
                   ["No Burst", "2 Gyr", "5 Gyr"])
    visuals.legend(axes[1][2], ["black", "crimson", "deepskyblue"],
                   ["No Burst", "2 Gyr", "5 Gyr"])
    visuals.sfr_ifr_legend(axes[0][0])
    for i in range(2):
        visuals.yticklabel_formatter(axes[i][-1])
    plt.tight_layout()
    plt.savefig(sys.argv[1])
    plt.clf()
Esempio n. 5
0
def main():
    """
	Produces the figure and saves it as a PDF.
	"""
    plt.clf()
    axes = setup_axes()
    plot_output(axes, "../../simulations/default", "black")
    plot_output(axes, "../../simulations/yccsr_zero", "crimson")
    plot_output(axes, "../../simulations/yccsr_linear", "lime")
    plot_output(axes, "../../simulations/yccsr_1-exp", "deepskyblue")
    visuals.plot_track_points_intervals(
        axes[0],
        vice.history("../../simulations/default"),
        element="Sr",
        reference="Fe")
    plot_legend(axes[1])
    plt.tight_layout()
    visuals.yticklabel_formatter(axes[1])
    plt.savefig(sys.argv[1])
    plt.clf()
Esempio n. 6
0
def main():
    """
	Produces the figure and saves it as a PDF.
	"""
    plt.clf()
    axes = setup_axes()
    plot_gas_driven_models(axes[0])
    plot_eff_driven_models(axes[1])
    visuals.sfr_ifr_legend(axes[0][0])
    visuals.legend(axes[0][-1], ["black", "crimson", "deepskyblue"], [
        r"$\tau_\text{s}$ = 0", r"$\tau_\text{s}$ = 0.5 Gyr",
        r"$\tau_\text{s}$ = 1 Gyr"
    ],
                   loc="upper right",
                   bbox_to_anchor=(0.99, 0.99))
    for i in range(2):
        visuals.yticklabel_formatter(axes[i][-1])
    plt.tight_layout()
    plt.subplots_adjust(right=0.985)
    plt.savefig(sys.argv[1])
    plt.clf()
Esempio n. 7
0
def main():
    """ 
	Produces the figure and saves it as a PDF. 
	"""
    plt.clf()
    axes = setup_axes()
    plot_gas_driven_sudden_onset_models(axes[0])
    plot_gas_driven_prolonged_models(axes[1])
    plot_eff_driven_models(axes[2])
    visuals.legend(axes[0][1], ["black", "crimson", "deepskyblue"],
                   ["No Burst", "2 Gyr", "5 Gyr"])
    visuals.legend(axes[1][1], ["black", "crimson", "deepskyblue"],
                   ["Sudden", "0.5 Gyr", "1 Gyr"])
    visuals.legend(axes[2][2], ["black", "crimson", "deepskyblue"],
                   ["No Burst", "2 Gyr", "5 Gyr"])
    visuals.sfr_ifr_legend(axes[0][0])
    visuals.sfr_ifr_legend(axes[1][0])
    for i in range(len(axes)):
        visuals.yticklabel_formatter(axes[i][-1])
    plt.tight_layout()
    plt.subplots_adjust(right=0.985)
    plt.savefig(sys.argv[1])
    plt.clf()
Esempio n. 8
0
    axes[0].set_xlim([-1, 11])
    axes[0].set_ylim([-1, 17])
    axes[1].set_xlim([-1.7, 0.2])
    axes[1].set_ylim([-0.1, 0.5])
    axes[2].set_xlim([-0.1, 0.5])
    axes[2].set_ylim([0.2, 50])
    visuals.set_labels_3axes(axes, "O")
    inset_xlim = [-0.26, -0.06]
    inset_ylim = [0.06, 0.16]
    visuals.draw_box(axes[1], inset_xlim, inset_ylim)
    inset = visuals.zoom_box(axes[1], inset_xlim, inset_ylim, zoom=3.8)
    plot_output_3axes(axes, "../../simulations/SFRoscil_amp0p3_per4",
                      "crimson")
    plot_output_3axes(axes, "../../simulations/SFRoscil_amp0p6_per2", "blue")
    plot_output_3axes(axes, "../../simulations/SFRoscil_amp0p3_per2", "black")
    visuals.plot_inset(inset, "../../simulations/SFRoscil_amp0p3_per4",
                       "crimson")
    visuals.plot_inset(inset, "../../simulations/SFRoscil_amp0p6_per2", "blue")
    visuals.plot_inset(inset, "../../simulations/SFRoscil_amp0p3_per2",
                       "black")
    visuals.plot_inset(inset,
                       "../../simulations/default",
                       "black",
                       linestyle=":")
    visuals.plot_reference(axes)
    visuals.yticklabel_formatter(axes[-1])
    visuals.sfr_ifr_legend(axes[0], ncol=2)
    plt.tight_layout()
    plt.savefig(sys.argv[1])
    plt.clf()