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 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()
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()
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()
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()