Exemplo n.º 1
0
    fig, ax = pyplot.subplots(figsize=(12, 10))

    # use gridspec to allow for one plot to be larger than the others
    gs = gridspec.GridSpec(3, 6, height_ratios=[2, 0.5, 0.5])

    ax = []
    ax.append(pyplot.subplot(gs[0, 0:3]))
    ax.append(pyplot.subplot(gs[0, 3:6]))
    ax.append(pyplot.subplot(gs[1, 0:2]))
    ax.append(pyplot.subplot(gs[1, 2:4]))
    ax.append(pyplot.subplot(gs[1, 4:6]))
    ax.append(pyplot.subplot(gs[2, 0:2]))
    ax.append(pyplot.subplot(gs[2, 2:4]))
    ax.append(pyplot.subplot(gs[2, 4:6]))

    plot_indiv_comp(ax[0], ["1e0", "1e1"], ["090"], "Total", "dirty_nz", r"$n_{z}$", fontsize=fontsize)
    leg = ax[0].legend(fontsize=0.95 * fontsize, loc="lower left")
    leg.get_frame().set_linewidth(2)
    ax[0].set_title("Global SED")
    ax[0].set_xlim(2, 100)

    plot_converge_slice(ax[1], ["1e0", "1e1"], ["035.11", "151.99"], "090", "dirty_nz", r"$n_{z}$", fontsize=fontsize)
    ax[1].yaxis.tick_right()
    ax[1].yaxis.set_label_position("right")
    leg = ax[1].legend(fontsize=0.95 * fontsize, loc="lower left")
    leg.get_frame().set_linewidth(2)
    ax[1].set_title(r"Y Image Slice, $\theta = 090^\circ$")
    ax[1].set_xlim(2, 100)

    modname = "dirty_nbinz"
    cvals = ["2", "5", "10", "20", "50", "100"]
    ax.append(plt.subplot(gs[1,5]))
    ax.append(plt.subplot(gs[2,5]))

    ax.append(plt.subplot(gs[0,6]))
    ax.append(plt.subplot(gs[1,6]))
    ax.append(plt.subplot(gs[2,6]))

    ax.append(plt.subplot(gs[0,7]))
    ax.append(plt.subplot(gs[1,7]))
    ax.append(plt.subplot(gs[2,7]))

    ax.append(plt.subplot(gs[0,8]))
    ax.append(plt.subplot(gs[1,8]))
    ax.append(plt.subplot(gs[2,8]))

    plot_indiv_comp(ax[0], ['1e0','1e1'], ['000','090','180'], 'Total',
                    'dirty_nphot', r'$N$', fontsize=fontsize)

    # Create two custom legends (more compact)

    # taus
    leg1 = ax[0].legend([plt.Line2D((0,1),(0,0), color='k', linestyle='-'),
                         plt.Line2D((0,1),(0,0), color='k', linestyle='--')],
                        [r'$\tau_z = 1e0$',
                         r'$\tau_z = 1e1$'],
                        fontsize=fontsize,
                        loc='lower left')
    leg1.get_frame().set_linewidth(2)

    # Add the legend manually to the current Axes.
    ax[0].add_artist(leg1)
Exemplo n.º 3
0
    fig, ax = pyplot.subplots(figsize=(12,8))

    # use gridspec to allow for one plot to be larger than the others
    gs = gridspec.GridSpec(2, 6, height_ratios=[2,1])

    ax = []
    ax.append(pyplot.subplot(gs[0,0:3]))
    ax.append(pyplot.subplot(gs[0,3:6]))
    ax.append(pyplot.subplot(gs[1,0]))
    ax.append(pyplot.subplot(gs[1,1]))
    ax.append(pyplot.subplot(gs[1,2]))
    ax.append(pyplot.subplot(gs[1,3]))
    ax.append(pyplot.subplot(gs[1,4]))
    ax.append(pyplot.subplot(gs[1,5]))

    plot_indiv_comp(ax[0], ['1e0','1e1'], ['000','180'], 'Total',
                    'dirty_nxy', r'$n_{xy}$', fontsize=fontsize)
    leg = ax[0].legend(fontsize=0.95*fontsize, loc='lower left')
    leg.get_frame().set_linewidth(2)
    ax[0].set_title('Global SED')
    ax[0].set_xlim(2,100)

    plot_converge_slice(ax[1], ['1e0','1e1'], ['035.11','151.99'], '000',
                        'dirty_nxy', r'$n_{xy}$', fontsize=fontsize)
    ax[1].yaxis.tick_right()
    ax[1].yaxis.set_label_position("right")
    leg = ax[1].legend(fontsize=0.95*fontsize, loc='lower left')
    leg.get_frame().set_linewidth(2)
    ax[1].set_title(r'Y Image Slice, $\theta = 000^\circ$')
    ax[1].set_xlim(2,100)
    
    modname = 'dirty_nbinxy'