def corner_plot(s, labels): x, y = s[:,0], s[:,1] fig = P.figure(figsize=(10,10)) ax2 = P.subplot(223) ax2.set_xlabel(labels[0]) ax2.set_ylabel(labels[1]) im = triangle.histo2d(x, y, ax=ax2, extent=[[0, 13.807108309208775],[0, 3.0]]) [l.set_rotation(45) for l in ax2.get_xticklabels()] [j.set_rotation(45) for j in ax2.get_yticklabels()] ax1 = P.subplot(221, xlim=[0, 13.807108309208775]) ax1.tick_params(axis='x', labelbottom='off') ax1.tick_params(axis='y', labelleft='off') ax1.hist(x, bins=50, histtype='step', color='k', range=(0, 13.807108309208775)) ax3 = P.subplot(224) ax3.tick_params(axis='x', labelbottom='off') ax3.tick_params(axis='y', labelleft='off') ax3.hist(y, bins=50, orientation='horizontal', histtype='step',color='k', range=(0,3)) P.subplots_adjust(wspace=0.05) P.subplots_adjust(hspace=0.05) cbar_ax = fig.add_axes([0.55, 0.565, 0.02, 0.405]) cb = fig.colorbar(im, cax = cbar_ax) cb.solids.set_edgecolor('face') cb.set_label(r'predicted SFR $[M_{\odot} yr^{-1}]$', labelpad = 20, fontsize=16) P.tight_layout() return fig
def corner_plot(s, labels): x, y = s[:, 0], s[:, 1] fig = P.figure(figsize=(10, 10)) ax2 = P.subplot(223) ax2.set_xlabel(labels[0]) ax2.set_ylabel(labels[1]) im = triangle.histo2d(x, y, ax=ax2, extent=[[0, 13.807108309208775], [0, 3.0]]) [l.set_rotation(45) for l in ax2.get_xticklabels()] [j.set_rotation(45) for j in ax2.get_yticklabels()] ax1 = P.subplot(221, xlim=[0, 13.807108309208775]) ax1.tick_params(axis="x", labelbottom="off") ax1.tick_params(axis="y", labelleft="off") ax1.hist(x, bins=50, histtype="step", color="k", range=(0, 13.807108309208775)) ax3 = P.subplot(224) ax3.tick_params(axis="x", labelbottom="off") ax3.tick_params(axis="y", labelleft="off") ax3.hist(y, bins=50, orientation="horizontal", histtype="step", color="k", range=(0, 3)) P.subplots_adjust(wspace=0.05) P.subplots_adjust(hspace=0.05) cbar_ax = fig.add_axes([0.522, 0.51, 0.02, 0.39]) cb = fig.colorbar(im, cax=cbar_ax) cb.solids.set_edgecolor("face") cb.set_label(r"predicted SFR $[M_{\odot} yr^{-1}]$", labelpad=20) return fig