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()
def plot_oscillatory_infall_model(axes, inset): """ Plots the models in which the infall rate oscillates with time Parameters ========== axes :: list The 1-D list of matplotlib axis objects to plot on inset :: subplot The matplotlib axis to plot the tracks inset on """ visuals.plot_output_3axes(axes, "../../simulations/SFRoscil_amp0p3_per4", "crimson", "O") visuals.plot_output_3axes(axes, "../../simulations/SFRoscil_amp0p6_per2", "deepskyblue", "O") visuals.plot_output_3axes(axes, "../../simulations/SFRoscil_amp0p3_per2", "black", "O") visuals.plot_track_points_intervals( axes[1], vice.history("../../simulations/SFRoscil_amp0p3_per2")) # visuals.plot_output_3axes(axes, "../../simulations/slow", "lime", "O") visuals.plot_inset(inset, "../../simulations/SFRoscil_amp0p3_per4", "crimson") visuals.plot_inset(inset, "../../simulations/SFRoscil_amp0p6_per2", "deepskyblue") visuals.plot_inset(inset, "../../simulations/SFRoscil_amp0p3_per2", "black") visuals.plot_inset(inset, "../../simulations/default", "black", linestyle=":") visuals.plot_track_points_intervals( inset, vice.history("../../simulations/SFRoscil_amp0p3_per2")) # visuals.plot_inset(inset, "../../simulations/slow", "lime") visuals.plot_reference(axes) visuals.sfr_ifr_legend(axes[0], ncol=2)
def plot_eff_driven_models(axes): """ Plots the efficiency-driven starburst models in the bottom row of panels. Parameters ========== axes :: list The 1-D list of matplotlib axes """ visuals.plot_output_4axes(axes, "../../simulations/SFEdriven_2Gyr", "crimson", "Sr") visuals.plot_output_4axes(axes, "../../simulations/SFEdriven_5Gyr", "deepskyblue", "Sr") visuals.plot_output_4axes(axes, "../../simulations/default", "black", "Sr", second_linestyle = ':') visuals.plot_track_points_intervals(axes[2], vice.history("../../simulations/default"), element = "Sr")
def plot_gas_driven_models(axes): """ Plots the gas-driven starburst models in the top row of panels. Parameters ========== axes :: list The 1-D list of matplotlib axes """ visuals.plot_output_3axes(axes, "../../simulations/sudden_2Gyr_5e9Msun", "crimson", "Sr") visuals.plot_output_3axes(axes, "../../simulations/sudden_5Gyr_5e9Msun", "deepskyblue", "Sr") visuals.plot_output_3axes(axes, "../../simulations/default", "black", "Sr", second_linestyle = ':') visuals.plot_track_points_intervals(axes[1], vice.history("../../simulations/default"), element = "Sr")
def plot_gas_driven_prolonged_models(axes): """ Plots the 5-Gyr gas driven models with varying accretion timescales. Parameters ========== axes :: list The 1-D list of matplotlib axes to plot on """ visuals.plot_output_3axes(axes, "../../simulations/prolonged_5Gyr_5e9Msun_0p5Gyr", "crimson", "O") visuals.plot_output_3axes(axes, "../../simulations/prolonged_5Gyr_5e9Msun_1p0Gyr", "deepskyblue", "O") visuals.plot_output_3axes(axes, "../../simulations/sudden_5Gyr_5e9Msun", "black", "O", second_linestyle = ':') visuals.plot_track_points_intervals(axes[1], vice.history("../../simulations/sudden_5Gyr_5e9Msun"))
def plot_eff_driven_models(axes): """ Plots the efficiency-driven starburst models on a set of axes Parameters ========== axes :: list The 1-D list of matplotlib axis objects to plot on """ visuals.plot_output_4axes(axes, "../../simulations/SFEdriven_5Gyr_ts0p5", "crimson", "O") visuals.plot_output_4axes(axes, "../../simulations/SFEdriven_5Gyr_ts1p0", "deepskyblue", "O") visuals.plot_output_4axes(axes, "../../simulations/SFEdriven_5Gyr", "black", "O", second_linestyle=':') visuals.plot_track_points_intervals( axes[2], vice.history("../../simulations/SFEdriven_5Gyr"))
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()
def main(): """ Produces the figure and saves it as a PDF. """ plt.clf() axes = setup_axes() plot_track(axes[0], "../../simulations/default", "black") plot_track(axes[0], "../../simulations/yccsr_linear", "crimson") plot_track(axes[0], "../../simulations/yccsr_1-exp", "deepskyblue") plot_track(axes[1], "../../simulations/sudden_5Gyr_5e9Msun", "black") plot_track(axes[1], "../../simulations/yccsr_linear_sudden_5Gyr_5e9Msun", "crimson") plot_track(axes[1], "../../simulations/yccsr_1-exp_sudden_5Gyr_5e9Msun", "deepskyblue") plot_track(axes[2], "../../simulations/SFEdriven_5Gyr", "black") plot_track(axes[2], "../../simulations/yccsr_linear_SFEdriven_5Gyr", "crimson") plot_track(axes[2], "../../simulations/yccsr_1-exp_SFEdriven_5Gyr", "deepskyblue") visuals.plot_track_points_intervals(axes[0], vice.history("../../simulations/default"), element = "Sr", reference = "O") visuals.plot_track_points_intervals(axes[1], vice.history("../../simulations/sudden_5Gyr_5e9Msun"), element = "Sr", reference = "O") visuals.plot_track_points_intervals(axes[2], vice.history("../../simulations/SFEdriven_5Gyr"), element = "Sr", reference = "O") legend(axes[0]) label(axes[1], "Gas-Driven") label(axes[2], "Efficiency-Driven") plt.savefig(sys.argv[1]) plt.clf()
def plot_oscillatory_eff_model(axes, inset): """ Plots the models in which the SFE timescale oscillates with time Parameters ========== axes :: list The 1-D list of matplotlib axis objects to plot on inset :: subplot The matplotlib axis to plot the tracks inset on """ visuals.plot_output_4axes(axes, "../../simulations/SFEoscil_amp0p2_per4", "crimson", "O") visuals.plot_output_4axes(axes, "../../simulations/SFEoscil_amp0p4_per2", "deepskyblue", "O") visuals.plot_output_4axes(axes, "../../simulations/SFEoscil_amp0p2_per2", "black", "O") visuals.plot_track_points_intervals( axes[2], vice.history("../../simulations/SFEoscil_amp0p2_per2")) # visuals.plot_output_4axes(axes, # "../../simulations/slow", "lime", "O") visuals.plot_inset(inset, "../../simulations/SFEoscil_amp0p2_per4", "crimson") visuals.plot_inset(inset, "../../simulations/SFEoscil_amp0p4_per2", "deepskyblue") visuals.plot_inset(inset, "../../simulations/SFEoscil_amp0p2_per2", "black") visuals.plot_inset(inset, "../../simulations/default", "black", linestyle=':') visuals.plot_track_points_intervals( inset, vice.history("../../simulations/SFEoscil_amp0p2_per2")) # visuals.plot_inset(inset, # "../../simulations/slow", "lime") visuals.plot_reference(axes)