Example #1
0
def bigplots(agb_tracks, infile):
    if type(agb_tracks[0]) == str:
        agb_tracks = [fileIO.get_numeric_data(a) for a in agb_tracks]
    out_fig = os.path.join(infile.diagnostic_dir, 'hrd_%.4f.png' % agb_tracks[0].metallicity)
    plot_title = '$\dot{M}_{\\rm M13}\ Z=%.4f$' % agb_tracks[0].metallicity
    nagb_tracks = len(agb_tracks)
    fig, (axs) = rspg.setup_multiplot(nagb_tracks,
                                      ylabel='$\log\ L\ (L_\odot)$',
                                      xlabel='$\log\ T_{\\rm eff}\ (K)$',
                                      title =plot_title,
                                      subplots_kwargs={'figsize': (30,30),
                                                       'squeeze': True})
    axs = axs.flatten()
    [hrd_slopes(agb_tracks[i], ax=axs[i]) for i in range(nagb_tracks)]
    plt.savefig(out_fig, dpi=300)
    ylabel = ['$C/O$', '$\log\ L\ (L_\odot)$', '$\log\ T_{\\rm eff}\ (K)$']
    ycol = ['C/O', 'logl', 'logt']
    for i in range(len(ylabel)):
        fig, (axs) = rspg.setup_multiplot(nagb_tracks,
                                          ylabel=ylabel[i],
                                          xlabel='${\\rm Age (yr)}$',
                                          title =plot_title,
                                          subplots_kwargs={'figsize': (30,30),
                                                           'squeeze': True})
        axs = axs.flatten()
        [age_vs_plot(agb_tracks[j], infile, ycol=ycol[i], ax=axs[j], annotate=True,
                     xlabels=False, ylabels=False, save_plot=False)
         for j in range(len(agb_tracks))]
        out_fig = out_fig.replace('hrd', 'age_v_%s' % ycol[i].lower().replace('c/o',
                                                                              'co'))
        plt.savefig(out_fig, dpi=300)